From 7a3b80a9b7f414967fe59f89ab0fe5416735babe Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sun, 31 Jan 2021 20:44:39 +0100 Subject: First batch of fixes (CallAndMessage) --- src/control/Pickups.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/control/Pickups.cpp') diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 96a8a670..8318bc1a 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -814,6 +814,9 @@ void CPickups::RenderPickUpText() { wchar *strToPrint; +#ifdef FIX_BUGS + strToPrint = nil; +#endif for (int32 i = 0; i < NumMessages; i++) { if (aMessages[i].m_quantity <= 39) { switch (aMessages[i].m_quantity) // could use some enum maybe @@ -1285,7 +1288,11 @@ CPacManPickups::GeneratePMPickUpsForRace(int32 race) int i = 0; if (race == 0) pPos = aRacePoints1; // there's only one available - assert(pPos != nil); + + if(!pPos) { + debug("This shouldn't happen"); + return; + } while (!pPos->IsZero()) { while (aPMPickUps[i].m_eType != PACMAN_NONE) -- cgit v1.2.3