aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/lure/game.cpp4
-rw-r--r--engines/lure/game.h1
-rw-r--r--engines/lure/lure.cpp2
3 files changed, 6 insertions, 1 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index 1ff9819f33..10db7b0613 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -40,6 +40,10 @@ namespace Lure {
static Game *int_game = NULL;
+bool Game::isCreated() {
+ return int_game != NULL;
+}
+
Game &Game::getReference() {
return *int_game;
}
diff --git a/engines/lure/game.h b/engines/lure/game.h
index 06dcee750f..de3fbd9b1f 100644
--- a/engines/lure/game.h
+++ b/engines/lure/game.h
@@ -73,6 +73,7 @@ public:
Game();
virtual ~Game();
+ static bool isCreated();
static Game &getReference();
void saveToStream(WriteStream *stream);
void loadFromStream(ReadStream *stream);
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 8640ed2d24..4481b2f92e 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -254,7 +254,7 @@ void LureEngine::GUIError(const char *msg, ...) {
}
GUI::Debugger *LureEngine::getDebugger() {
- return &Game::getReference().debugger();
+ return !Game::isCreated() ? NULL : &Game::getReference().debugger();
}
void LureEngine::syncSoundSettings() {