From 0e6e0280fc84924a7f983baec4e1357de07d5c63 Mon Sep 17 00:00:00 2001 From: Vantha Date: Mon, 4 May 2026 11:54:22 +0200 Subject: [PATCH] Prevent segfault in CMiniMap::Tick Oversight in 01476b9836 For example, it could cause a segfault when rendering a frame after EndGame was called therefore g_Game already deleted. --- source/gui/ObjectTypes/CMiniMap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/gui/ObjectTypes/CMiniMap.cpp b/source/gui/ObjectTypes/CMiniMap.cpp index 4808fada5f..48373e6139 100644 --- a/source/gui/ObjectTypes/CMiniMap.cpp +++ b/source/gui/ObjectTypes/CMiniMap.cpp @@ -121,6 +121,9 @@ CMiniMap::CMiniMap(CGUI& pGUI) : void CMiniMap::Tick() { + if (!g_Game || !g_Game->GetView() || !g_Game->IsGameStarted()) + return; + g_Game->GetView()->GetMiniMapTexture().RequestRendering(); }