From a64b12bb039cbcca11826a661feeca79dbe637d1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 1 Jul 2007 18:22:25 +0000 Subject: Only invoke g_engine->pauseEngine if g_engine != NULL svn-id: r27831 --- backends/events/default/default-events.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'backends/events/default') 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; -- cgit v1.2.3