Fix crash on null type

This commit is contained in:
Wojtek Figat
2021-06-14 14:28:16 +02:00
parent e455ada90a
commit bbbcfb707d

View File

@@ -865,7 +865,7 @@ bool Scripting::IsEveryAssemblyLoaded()
bool Scripting::IsTypeFromGameScripts(MClass* type)
{
const auto binaryModule = ManagedBinaryModule::GetModule(type->GetAssembly());
const auto binaryModule = ManagedBinaryModule::GetModule(type ? type->GetAssembly() : nullptr);
return binaryModule && binaryModule != GetBinaryModuleCorlib() && binaryModule != GetBinaryModuleFlaxEngine();
}