crash fix

This commit is contained in:
Nikolay Korolev 2020-05-27 19:39:04 +03:00
parent 02741dc64f
commit d4ae40ae99

View file

@ -840,6 +840,7 @@ CPickups::RenderPickUpText()
if (aMessages[i].m_weaponType == WEAPONTYPE_TOTALWEAPONS) { // unreachable code? if (aMessages[i].m_weaponType == WEAPONTYPE_TOTALWEAPONS) { // unreachable code?
// what is this?? // what is this??
sprintf(gString, "%d/%d", CWorld::Players[CWorld::PlayerInFocus].m_nCollectedPackages, 2903); sprintf(gString, "%d/%d", CWorld::Players[CWorld::PlayerInFocus].m_nCollectedPackages, 2903);
strToPrint = nil;
} else { } else {
if (aMessages[i].m_bOutOfStock) if (aMessages[i].m_bOutOfStock)
strToPrint = TheText.Get("STOCK"); strToPrint = TheText.Get("STOCK");
@ -971,6 +972,8 @@ CPickups::RenderPickUpText()
break; break;
} }
} }
if (strToPrint == nil)
continue;
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();