1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed empty name crash

This commit is contained in:
Brian Fiete 2025-01-07 09:12:03 -08:00
parent 5d694cc3c4
commit 41b280f2df

View file

@ -1519,17 +1519,18 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration)
}
if (typeDeclaration->mNameNode == NULL)
{
if (typeDeclaration->mStaticSpecifier != NULL)
if (typeDeclaration->mAnonymousName != NULL)
{
mCurTypeDef->mName = mSystem->GetAtom(typeDeclaration->mAnonymousName);
}
if (mCurTypeDef->mName == NULL)
{
// Global
mCurTypeDef->mName = mSystem->mGlobalsAtom;
mCurTypeDef->mName->Ref();
BF_ASSERT(mCurTypeDef->mSystem != NULL);
}
else
{
mCurTypeDef->mName = mSystem->GetAtom(typeDeclaration->mAnonymousName);
}
}
}
else
{