From b9d4ce052b10e8d93d3e32b09e3bf5d6c843247f Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 14 Mar 2020 12:33:36 +0200 Subject: [PATCH] - replaced assert() in ZScript fields compilation code Field pointer can be null if error occurred while compiling its definition --- src/scripting/zscript/zcc_compile.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index b11cf10bb5..26b4b73ca9 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -1559,9 +1559,7 @@ bool ZCCCompiler::CompileFields(PContainerType *type, TArrayName).GetChars()); } - assert(f != nullptr); - - if (field->Flags & (ZCC_Version | ZCC_Deprecated)) + if ((field->Flags & (ZCC_Version | ZCC_Deprecated)) && f != nullptr) { f->mVersion = field->Version;