From be0c4e5d883211eef4486727d01071caa86ecb98 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 23 Aug 2022 12:55:11 -0700 Subject: [PATCH] Fixed null methodDef selection in failed attribute --- IDEHelper/Compiler/BfModule.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index c7797481..3bb075ad 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -12232,6 +12232,12 @@ void BfModule::GetCustomAttributes(BfCustomAttributes* customAttributes, BfAttri if (methodMatcher.mBestMethodDef == NULL) methodMatcher.mBestMethodDef = methodMatcher.mBackupMethodDef; + if (methodMatcher.mBestMethodDef == NULL) + { + AssertErrorState(); + continue; + } + BF_ASSERT(methodMatcher.mBestMethodDef != NULL); customAttribute.mCtor = methodMatcher.mBestMethodDef;