From 33acdb079249166e4d244a388f6de119b1e11fd0 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Sun, 19 Apr 2026 22:35:44 +0000 Subject: [PATCH] bugfix(loadscreen): Prevent null pointer dereference when accessing game slot --- Core/GameEngine/Source/GameClient/GUI/LoadScreen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/GameEngine/Source/GameClient/GUI/LoadScreen.cpp b/Core/GameEngine/Source/GameClient/GUI/LoadScreen.cpp index 929082397cc..a374446736b 100644 --- a/Core/GameEngine/Source/GameClient/GUI/LoadScreen.cpp +++ b/Core/GameEngine/Source/GameClient/GUI/LoadScreen.cpp @@ -1986,7 +1986,8 @@ void MapTransferLoadScreen::init( GameInfo *game ) GadgetStaticTextSetText(m_progressText[netSlot], UnicodeString::TheEmptyString ); m_progressText[netSlot]->winSetEnabledTextColors(houseColor, m_progressText[netSlot]->winGetEnabledTextBorderColor()); - if ((i == 0 || (TheGameInfo->getConstSlot(i)->isHuman() && TheGameInfo->getConstSlot(i)->hasMap())) && m_progressBars[netSlot]) + const GameSlot *gameInfoSlot = TheGameInfo->getConstSlot(i); + if ((i == 0 || (gameInfoSlot && gameInfoSlot->isHuman() && gameInfoSlot->hasMap())) && m_progressBars[netSlot]) m_progressBars[netSlot]->winHide(TRUE); m_playerLookup[i] = netSlot; // save our mapping so we can update progress correctly