Skip to content

Commit

Permalink
WINTERMUTE: Add a sanity check for _game.
Browse files Browse the repository at this point in the history
  • Loading branch information
somaen committed Apr 17, 2013
1 parent c64386f commit 4ab8016
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion engines/wintermute/wintermute.cpp
Expand Up @@ -239,6 +239,9 @@ int WintermuteEngine::messageLoop() {
const uint32 maxFPS = 60;
const uint32 frameTime = 2 * (uint32)((1.0 / maxFPS) * 1000);
while (!done) {
if (!_game) {
break;
}
_debugger->onFrame();

Common::Event event;
Expand Down Expand Up @@ -272,7 +275,7 @@ int WintermuteEngine::messageLoop() {
}
prevTime = time;
}
if (_game->_quitting) {
if (_game && _game->_quitting) {
break;
}
}
Expand Down

0 comments on commit 4ab8016

Please sign in to comment.