ENGINES: Create a default debugger when needed if none is yet set
This commit is contained in:
parent
73f17c2ae0
commit
98f9c4f254
3 changed files with 18 additions and 4 deletions
|
@ -86,7 +86,7 @@ static void defaultErrorHandler(const char *msg) {
|
|||
// Unless this error -originated- within the debugger itself, we
|
||||
// now invoke the debugger, if available / supported.
|
||||
if (g_engine) {
|
||||
GUI::Debugger *debugger = g_engine->getDebugger();
|
||||
GUI::Debugger *debugger = g_engine->getOrCreateDebugger();
|
||||
|
||||
#if defined(USE_TASKBAR)
|
||||
g_system->getTaskbarManager()->notifyError();
|
||||
|
@ -760,6 +760,15 @@ bool Engine::shouldQuit() {
|
|||
return (eventMan->shouldQuit() || eventMan->shouldRTL());
|
||||
}
|
||||
|
||||
GUI::Debugger *Engine::getOrCreateDebugger() {
|
||||
if (!_debugger)
|
||||
// Create a bare-bones debugger. This is useful for engines without their own
|
||||
// debugger when an error occurs
|
||||
_debugger = new GUI::Debugger();
|
||||
|
||||
return _debugger;
|
||||
}
|
||||
|
||||
/*
|
||||
EnginePlugin *Engine::getMetaEnginePlugin() const {
|
||||
return EngineMan.findPlugin(ConfMan.get("engineid"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue