From b122655a464ba908cde704f656c09cf1e9056e4b Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 24 Jun 2021 06:59:49 -0700 Subject: [PATCH] Crash fix for GetCustomAttribute in no-attribute case --- IDEHelper/Compiler/CeMachine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IDEHelper/Compiler/CeMachine.cpp b/IDEHelper/Compiler/CeMachine.cpp index dae24555..49b67443 100644 --- a/IDEHelper/Compiler/CeMachine.cpp +++ b/IDEHelper/Compiler/CeMachine.cpp @@ -3295,6 +3295,9 @@ bool CeContext::GetStringFromStringView(addr_ce addr, StringImpl& str) bool CeContext::GetCustomAttribute(BfCustomAttributes* customAttributes, int attributeTypeId, addr_ce resultAddr) { + if (customAttributes == NULL) + return false; + BfType* attributeType = GetBfType(attributeTypeId); if (attributeType == NULL) return false;