Bläddra i källkod

- fixed crash on finishing a campaign.

Ivan Savenko 11 år sedan
förälder
incheckning
14535c1c7b
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      client/CPreGame.cpp

+ 4 - 4
client/CPreGame.cpp

@@ -512,10 +512,10 @@ void CGPreGame::update()
 	GH.updateTime();
 	GH.handleEvents();
 
-	//if (GH.curInt == nullptr) // no redraw, when a new game was created
-		//return;
-
-	GH.topInt()->show(screen);
+	// check for null othervice crash on finishing a campaign
+	// /FIXME: find out why GH.listInt is empty to begin with
+	if (GH.topInt() != nullptr)
+		GH.topInt()->show(screen);
 
 	if (settings["general"]["showfps"].Bool())
 		GH.drawFPSCounter();