aboutsummaryrefslogtreecommitdiff
path: root/sword2/sword2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sword2/sword2.cpp')
-rw-r--r--sword2/sword2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp
index 138283c547..16ac6bec58 100644
--- a/sword2/sword2.cpp
+++ b/sword2/sword2.cpp
@@ -209,7 +209,7 @@ void Sword2Engine::errorString(const char *buf1, char *buf2) {
// Unless an error -originated- within the debugger, spawn the debugger. Otherwise
// exit out normally.
- if (!_debugger->isAttached()) {
+ if (_debugger && !_debugger->isAttached()) {
printf("%s\n", buf2); // (Print it again in case debugger segfaults)
_debugger->attach(buf2);
_debugger->onFrame();