Skip to content

Commit 3cd91fb

Browse files
committed
Fix NRE for inlined thread statics
1 parent 79ce959 commit 3cd91fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ThreadStaticsNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private ISymbolNode GetGCStaticEETypeNode(NodeFactory factory)
6161
_inlined.GetOffsets(),
6262
_inlined.GetSize(),
6363
factory.Target.PointerSize);
64-
bool requiresAlign8 = _type.ThreadGcStaticFieldAlignment.AsInt > factory.Target.PointerSize;
64+
bool requiresAlign8 = _type is not null && _type.ThreadGcStaticFieldAlignment.AsInt > factory.Target.PointerSize;
6565

6666
return factory.GCStaticEEType(map, requiresAlign8);
6767
}

0 commit comments

Comments
 (0)