From b0fbc87d3133a07a59edbc355f052c8a6c760376 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 11 May 2020 10:14:27 -0700 Subject: [PATCH] Fixed issue with unreifiied module having mFuncReferences set --- IDEHelper/Compiler/BfModuleTypeUtils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/IDEHelper/Compiler/BfModuleTypeUtils.cpp b/IDEHelper/Compiler/BfModuleTypeUtils.cpp index 8a1aa2f2..b9401d1e 100644 --- a/IDEHelper/Compiler/BfModuleTypeUtils.cpp +++ b/IDEHelper/Compiler/BfModuleTypeUtils.cpp @@ -4316,8 +4316,11 @@ void BfModule::AddMethodToWorkList(BfMethodInstance* methodInstance) PrepareForIRWriting(methodInstance->GetOwner()); BfIRValue func = CreateFunctionFrom(methodInstance, false, methodInstance->mAlwaysInline); - methodInstance->mIRFunction = func; - mFuncReferences[methodInstance] = func; + if (func) + { + methodInstance->mIRFunction = func; + mFuncReferences[methodInstance] = func; + } } BF_ASSERT(methodInstance->mDeclModule == this);