1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Added null check to fieldDecl in autocomplete

This commit is contained in:
Brian Fiete 2021-07-31 10:29:31 -07:00
parent cc75c3bd16
commit e5f92fb21b

View file

@ -4358,7 +4358,7 @@ void BfCompiler::ProcessAutocompleteTempType()
if (fieldDef->mTypeRef != NULL)
{
BfResolveTypeRefFlags flags = BfResolveTypeRefFlag_None;
if (fieldDecl->mInitializer != NULL)
if ((fieldDecl != NULL) && (fieldDecl->mInitializer != NULL))
flags = (BfResolveTypeRefFlags)(flags | BfResolveTypeRefFlag_AllowInferredSizedArray);
module->ResolveTypeRef(fieldDef->mTypeRef, BfPopulateType_Identity, flags);
}