[Scummvm-cvs-logs] SF.net SVN: scummvm:[47018] scummvm/trunk/engines/lure

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Tue Jan 5 06:25:21 CET 2010


Revision: 47018
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47018&view=rev
Author:   dreammaster
Date:     2010-01-05 05:25:18 +0000 (Tue, 05 Jan 2010)

Log Message:
-----------
Bugfix for crash if an error occurs before the game object (and thus the debugger) is created

Modified Paths:
--------------
    scummvm/trunk/engines/lure/game.cpp
    scummvm/trunk/engines/lure/game.h
    scummvm/trunk/engines/lure/lure.cpp

Modified: scummvm/trunk/engines/lure/game.cpp
===================================================================
--- scummvm/trunk/engines/lure/game.cpp	2010-01-05 04:00:13 UTC (rev 47017)
+++ scummvm/trunk/engines/lure/game.cpp	2010-01-05 05:25:18 UTC (rev 47018)
@@ -40,6 +40,10 @@
 
 static Game *int_game = NULL;
 
+bool Game::isCreated() {
+	return int_game != NULL;
+}
+
 Game &Game::getReference() {
 	return *int_game;
 }

Modified: scummvm/trunk/engines/lure/game.h
===================================================================
--- scummvm/trunk/engines/lure/game.h	2010-01-05 04:00:13 UTC (rev 47017)
+++ scummvm/trunk/engines/lure/game.h	2010-01-05 05:25:18 UTC (rev 47018)
@@ -73,6 +73,7 @@
 	Game();
 	virtual ~Game();
 
+	static bool isCreated();
 	static Game &getReference();
 	void saveToStream(WriteStream *stream);
 	void loadFromStream(ReadStream *stream);

Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp	2010-01-05 04:00:13 UTC (rev 47017)
+++ scummvm/trunk/engines/lure/lure.cpp	2010-01-05 05:25:18 UTC (rev 47018)
@@ -254,7 +254,7 @@
 }
 
 GUI::Debugger *LureEngine::getDebugger() {
-	return &Game::getReference().debugger();
+	return !Game::isCreated() ? NULL : &Game::getReference().debugger();
 }
 
 void LureEngine::syncSoundSettings() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list