From 14535c1c7b76c728bba078c6836eb7d0695d06c9 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Sat, 1 Feb 2014 14:32:09 +0000 Subject: [PATCH] - fixed crash on finishing a campaign. --- client/CPreGame.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/CPreGame.cpp b/client/CPreGame.cpp index d33438a1c..345b0a1a6 100644 --- a/client/CPreGame.cpp +++ b/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();