From 662566ed160a57a028ff353f35049e322f7095df Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sat, 5 Feb 2022 11:37:43 -0500 Subject: [PATCH] Fixed dep issue during ConstantToCurrent with null mCurTypeInstance --- IDEHelper/Compiler/BfModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index c7834209..7c12b92b 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -11258,7 +11258,8 @@ BfIRValue BfModule::ConstantToCurrent(BfConstant* constant, BfIRConstHolder* con if (constant->mConstType == Beefy::BfConstType_TypeOf) { auto constTypeOf = (BfTypeOf_Const*)constant; - AddDependency(constTypeOf->mType, mCurTypeInstance, BfDependencyMap::DependencyFlag_ExprTypeReference); + if (mCurTypeInstance != NULL) + AddDependency(constTypeOf->mType, mCurTypeInstance, BfDependencyMap::DependencyFlag_ExprTypeReference); return CreateTypeDataRef(constTypeOf->mType); }