diff options
| -rw-r--r-- | simon/simon.cpp | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/simon/simon.cpp b/simon/simon.cpp index 6614ceda4b..7d720566e2 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -755,6 +755,14 @@ SimonEngine::~SimonEngine() {  void SimonEngine::errorString(const char *buf1, char *buf2) {  	strcpy(buf2, buf1); + +	// Unless an error -originated- within the debugger, spawn the debugger. Otherwise +	// exit out normally. +	if (_debugger && !_debugger->isAttached()) { +		printf("%s\n", buf2);	// (Print it again in case debugger segfaults) +		_debugger->attach(buf2); +		_debugger->onFrame(); +	}  }  void palette_fadeout(uint32 *pal_values, uint num) { | 
