Base: Prevent crash when trying to create badType instance

This commit is contained in:
marioalexis
2022-05-22 02:38:43 -03:00
committed by wwmayer
parent a865e4f834
commit e76e4acb0f

View File

@@ -84,7 +84,8 @@ Type::~Type()
void *Type::createInstance()
{
return (typedata[index]->instMethod)();
instantiationMethod method = typedata[index]->instMethod;
return method ? (*method)() : nullptr;
}