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

FieldDef null check

This commit is contained in:
Brian Fiete 2022-04-17 06:34:34 -07:00
parent 44ecb92315
commit 9687e7dccc

View file

@ -16753,7 +16753,10 @@ void BfModule::EmitDtorBody()
{
auto fieldInst = &mCurTypeInstance->mFieldInstances[fieldIdx];
auto fieldDef = fieldInst->GetFieldDef();
auto fieldDecl = fieldDef->GetFieldDeclaration();
BfFieldDeclaration* fieldDecl = NULL;
if (fieldDef != NULL)
fieldDecl = fieldDef->GetFieldDeclaration();
if ((fieldDef != NULL) && (fieldDef->mIsStatic == methodDef->mIsStatic) && (fieldDecl != NULL) && (fieldDecl->mFieldDtor != NULL))
{