[Scummvm-cvs-logs] CVS: scummvm/scumm debug.cpp,1.11,1.12

James Brown ender at users.sourceforge.net
Sun Dec 15 19:26:03 CET 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv20459

Modified Files:
	debug.cpp 
Log Message:
Tip: If your going to call a member function of a pointer to an object... do it BEFORE you delete the pointer :)



Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debug.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- debug.cpp	15 Dec 2002 23:22:37 -0000	1.11
+++ debug.cpp	16 Dec 2002 03:25:51 -0000	1.12
@@ -32,6 +32,7 @@
 #ifdef USE_CONSOLE
 #include "gui/console.h"
 #define printf	_s->_debuggerDialog->printf
+#warning console enabled
 #else
 #ifdef HAVE_READLINE
 #include "debugrl.h"
@@ -235,11 +236,13 @@
 
 void ScummDebugger::detach()
 {
-	_s->_debugger = NULL;
-	_s = NULL;
 #ifdef USE_CONSOLE
-	_s->_debuggerDialog->setInputeCallback(0, 0);
+	if (_s->_debuggerDialog)
+		_s->_debuggerDialog->setInputeCallback(0, 0);
 #endif
+
+	_s->_debugger = NULL;
+	_s = NULL;
 }
 
 struct DebuggerCommands {





More information about the Scummvm-git-logs mailing list