aboutsummaryrefslogtreecommitdiff
path: root/scumm/debug.cpp
diff options
context:
space:
mode:
authorJames Brown2002-12-16 03:25:51 +0000
committerJames Brown2002-12-16 03:25:51 +0000
commit932bfdeed7e1c9c0cbe59a5a77970c316912bf93 (patch)
tree0043e4a6a255f701037bae880535c90ee50d26d9 /scumm/debug.cpp
parent4c831704cdab662a7e16e4ec7a900ed08b793437 (diff)
downloadscummvm-rg350-932bfdeed7e1c9c0cbe59a5a77970c316912bf93.tar.gz
scummvm-rg350-932bfdeed7e1c9c0cbe59a5a77970c316912bf93.tar.bz2
scummvm-rg350-932bfdeed7e1c9c0cbe59a5a77970c316912bf93.zip
Tip: If your going to call a member function of a pointer to an object... do it BEFORE you delete the pointer :)
svn-id: r5989
Diffstat (limited to 'scumm/debug.cpp')
-rw-r--r--scumm/debug.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/scumm/debug.cpp b/scumm/debug.cpp
index d5f2c0ccd2..a92653dabe 100644
--- a/scumm/debug.cpp
+++ b/scumm/debug.cpp
@@ -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::on_frame()
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 {