aboutsummaryrefslogtreecommitdiff
path: root/backends/events/default
diff options
context:
space:
mode:
authorMax Horn2007-07-01 18:22:25 +0000
committerMax Horn2007-07-01 18:22:25 +0000
commita64b12bb039cbcca11826a661feeca79dbe637d1 (patch)
tree2612ddecc556d14689a0e1494c638326789b37a3 /backends/events/default
parente1bcd70436656ed48933aadca38636f70348c842 (diff)
downloadscummvm-rg350-a64b12bb039cbcca11826a661feeca79dbe637d1.tar.gz
scummvm-rg350-a64b12bb039cbcca11826a661feeca79dbe637d1.tar.bz2
scummvm-rg350-a64b12bb039cbcca11826a661feeca79dbe637d1.zip
Only invoke g_engine->pauseEngine if g_engine != NULL
svn-id: r27831
Diffstat (limited to 'backends/events/default')
-rw-r--r--backends/events/default/default-events.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index af2d688d43..6bd97c7f71 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -98,10 +98,12 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
case Common::EVENT_QUIT:
if (ConfMan.getBool("confirm_exit")) {
- g_engine->pauseEngine(true);
+ if (g_engine)
+ g_engine->pauseEngine(true);
GUI::MessageDialog alert("Do you really want to quit?", "Yes", "No");
result = _shouldQuit = (alert.runModal() == GUI::kMessageOK);
- g_engine->pauseEngine(false);
+ if (g_engine)
+ g_engine->pauseEngine(false);
} else
_shouldQuit = true;
break;