mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-27 04:52:36 +00:00
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.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user