aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-04-17 15:25:10 +0200
committerEinar Johan Trøan Sømåen2013-04-17 15:25:10 +0200
commit4ab80160da661a9dd5aca068c813014133b62920 (patch)
tree791d44f4841bd12d9ac418aa037ea582dc5cfea5 /engines/wintermute
parentc64386fe8813d46a8335ca59e2bd6c461b0d5331 (diff)
downloadscummvm-rg350-4ab80160da661a9dd5aca068c813014133b62920.tar.gz
scummvm-rg350-4ab80160da661a9dd5aca068c813014133b62920.tar.bz2
scummvm-rg350-4ab80160da661a9dd5aca068c813014133b62920.zip
WINTERMUTE: Add a sanity check for _game.
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/wintermute.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 4e661506e3..b17ad99423 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -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;
@@ -272,7 +275,7 @@ int WintermuteEngine::messageLoop() {
}
prevTime = time;
}
- if (_game->_quitting) {
+ if (_game && _game->_quitting) {
break;
}
}