Skip to content

Commit 714cff6

Browse files
committed
Add sanity check for null callers or types
1 parent a629d0c commit 714cff6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/CLR/Core/TypeSystem.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,11 @@ bool CLR_RT_TypeDef_Instance::ResolveToken(
10191019
int pos = elem.GenericParamPosition;
10201020

10211021
// Use the *caller's* bound genericType (Stack<Int32>, etc.)
1022+
if (caller == nullptr || caller->genericType == nullptr)
1023+
{
1024+
return false;
1025+
}
1026+
10221027
auto &tsi = *caller->genericType;
10231028
CLR_UINT32 closedTsRow = tsi.TypeSpec();
10241029

0 commit comments

Comments
 (0)