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

Null guard

This commit is contained in:
Brian Fiete 2020-07-31 06:18:26 -07:00
parent b544f96bf7
commit 88e8a60bd8
2 changed files with 5 additions and 3 deletions

View file

@ -2441,7 +2441,8 @@ void COFF::ParseCompileUnit_Symbols(DbgCompileUnit* compileUnit, uint8* sectionD
//variable->mCompileUnit = m; //variable->mCompileUnit = m;
// Push front so we will find before the original static declaration (that has no memory associated with it) // Push front so we will find before the original static declaration (that has no memory associated with it)
targetType->mMemberList.PushFront(variable); if (targetType != NULL)
targetType->mMemberList.PushFront(variable);
if ((variable->mIsExtern) && (variable->mLinkName != NULL)) if ((variable->mIsExtern) && (variable->mLinkName != NULL))
mStaticVariables.push_back(variable); mStaticVariables.push_back(variable);
@ -5629,7 +5630,7 @@ uint8* COFF::HandleSymStreamEntries(CvSymStreamType symStreamType, uint8* data,
BF_ASSERT(numRecordsRead == entryIdxMax); BF_ASSERT(numRecordsRead == entryIdxMax);
OutputDebugStrF("HandleSymStreamEntries Ticks: %d\n", BFTickCount() - tickStart); //OutputDebugStrF("HandleSymStreamEntries Ticks: %d\n", BFTickCount() - tickStart);
return dataEnd; return dataEnd;
} }

View file

@ -6985,7 +6985,8 @@ BfInitializerExpression* BfReducer::TryCreateInitializerExpression(BfExpression*
mVisitorPos.Trim(); mVisitorPos.Trim();
MEMBER_SET(initializerExpr, mCloseBrace, block->mCloseBrace); if (block->mCloseBrace != NULL)
MEMBER_SET(initializerExpr, mCloseBrace, block->mCloseBrace);
return initializerExpr; return initializerExpr;
} }