From 77ce6a4175697189c07bfe59d1accf31158e24ec Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 30 May 2023 09:00:30 -0400 Subject: [PATCH] Fixed some extension dtor null issues --- IDEHelper/Compiler/BfCompiler.cpp | 2 +- IDEHelper/Compiler/BfModule.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IDEHelper/Compiler/BfCompiler.cpp b/IDEHelper/Compiler/BfCompiler.cpp index 84ed69af..0254ec7d 100644 --- a/IDEHelper/Compiler/BfCompiler.cpp +++ b/IDEHelper/Compiler/BfCompiler.cpp @@ -5908,7 +5908,7 @@ void BfCompiler::PopulateReified() if ((methodDef->mIsOverride) && (methodDef->mParams.mSize == declaringMethod->mMethodDef->mParams.mSize)) { auto implMethod = typeInst->mModule->GetRawMethodInstance(typeInst, methodDef); - if (typeInst->mModule->CompareMethodSignatures(declaringMethod, implMethod)) + if ((implMethod != NULL) && (typeInst->mModule->CompareMethodSignatures(declaringMethod, implMethod))) { if ((implMethod != NULL) && ((!implMethod->mMethodInstanceGroup->IsImplemented()) || (!implMethod->mIsReified))) { diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index b85b739b..2d13aad3 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -5960,7 +5960,7 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary& usedStrin if (typeInstance->mDefineState >= BfTypeDefineState_DefinedAndMethodsSlotted) { BfMethodInstance* methodInstance = typeInstance->mVirtualMethodTable[mCompiler->GetVTableMethodOffset() + 0].mImplementingMethod; - if (methodInstance->GetOwner() != mContext->mBfObjectType) + if ((methodInstance != NULL) && (methodInstance->GetOwner() != mContext->mBfObjectType)) typeFlags |= BfTypeFlags_HasDestructor; } }