C4Application: Check if pGameTimer exists before removing/deleting

heavy-resources
Martin Plicht 2014-01-13 08:29:21 +01:00
parent a4c858f4ee
commit 426e6c659a
1 changed files with 5 additions and 2 deletions

View File

@ -554,8 +554,11 @@ void C4Application::Clear()
Game.Clear();
NextMission.Clear();
// stop timer
Remove(pGameTimer);
delete pGameTimer; pGameTimer = NULL;
if (pGameTimer)
{
Remove(pGameTimer);
delete pGameTimer; pGameTimer = NULL;
}
// quit irc
IRCClient.Close();
// close system group (System.ocg)