From 038e2c34b7128e8a82d8bbb3ca86f471239162f0 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 18:44:54 +0000 Subject: [PATCH] bugfix(gamenetwork): Prevent crash when TheGameState is null in LANAPIhandlers --- Core/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp b/Core/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp index 7f88b835f86..2a9b3b6cfbf 100644 --- a/Core/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp +++ b/Core/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp @@ -595,6 +595,11 @@ void LANAPI::handleHasMap( LANMessage *msg, UnsignedInt senderIP ) { if (!m_inLobby && m_currentGame) { + if (!TheGameState) + { + return; + } + CRC mapNameCRC; // mapNameCRC.computeCRC(m_currentGame->getMap().str(), m_currentGame->getMap().getLength()); AsciiString portableMapName = TheGameState->realMapPathToPortableMapPath(m_currentGame->getMap());