mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07: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:
parent
adfe6b0c36
commit
0e6e0280fc
1 changed files with 3 additions and 0 deletions
|
|
@ -121,6 +121,9 @@ CMiniMap::CMiniMap(CGUI& pGUI) :
|
||||||
|
|
||||||
void CMiniMap::Tick()
|
void CMiniMap::Tick()
|
||||||
{
|
{
|
||||||
|
if (!g_Game || !g_Game->GetView() || !g_Game->IsGameStarted())
|
||||||
|
return;
|
||||||
|
|
||||||
g_Game->GetView()->GetMiniMapTexture().RequestRendering();
|
g_Game->GetView()->GetMiniMapTexture().RequestRendering();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue