- replaced assert() in ZScript fields compilation code

Field pointer can be null if error occurred while compiling its definition
This commit is contained in:
alexey.lysiuk 2020-03-14 12:33:36 +02:00 committed by drfrag
parent 6622801ad5
commit e276f70dfa

View file

@ -1563,9 +1563,7 @@ bool ZCCCompiler::CompileFields(PContainerType *type, TArray<ZCC_VarDeclarator *
f = type->AddField(name->Name, thisfieldtype, varflags);
}
assert(f != nullptr);
if (field->Flags & (ZCC_Version | ZCC_Deprecated))
if ((field->Flags & (ZCC_Version | ZCC_Deprecated)) && f != nullptr)
{
f->mVersion = field->Version;