1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Allow GetWrappedStructType to fail

This commit is contained in:
Brian Fiete 2025-05-17 08:46:04 +02:00
parent 95a9c7aa8e
commit 9e3c6dcb3f

View file

@ -7965,9 +7965,9 @@ BfTypeInstance* BfModule::GetWrappedStructType(BfType* type, bool allowSpecializ
else
return ResolveTypeDef(mCompiler->mSizedArrayTypeDef, BfPopulateType_Data)->ToTypeInstance();
}
BF_ASSERT(type->IsPrimitiveType());
return GetPrimitiveStructType(((BfPrimitiveType*)type)->mTypeDef->mTypeCode);
if (type->IsPrimitiveType())
return GetPrimitiveStructType(((BfPrimitiveType*)type)->mTypeDef->mTypeCode);
return NULL;
}
BfPrimitiveType* BfModule::GetPrimitiveType(BfTypeCode typeCode)