From d4ae40ae99ff189e0caa6f5db2285f6bed51e80a Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Wed, 27 May 2020 19:39:04 +0300 Subject: crash fix --- src/control/Pickups.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 1d2d06f7..3ac1bb4a 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -840,6 +840,7 @@ CPickups::RenderPickUpText() if (aMessages[i].m_weaponType == WEAPONTYPE_TOTALWEAPONS) { // unreachable code? // what is this?? sprintf(gString, "%d/%d", CWorld::Players[CWorld::PlayerInFocus].m_nCollectedPackages, 2903); + strToPrint = nil; } else { if (aMessages[i].m_bOutOfStock) strToPrint = TheText.Get("STOCK"); @@ -971,6 +972,8 @@ CPickups::RenderPickUpText() break; } } + if (strToPrint == nil) + continue; CFont::SetPropOn(); CFont::SetBackgroundOff(); -- cgit v1.2.3