Commit 2e1cad3b authored by hjk's avatar hjk
Browse files

debugger: fix crash on exit

Order matters.
parent 562d0c5f
......@@ -509,8 +509,12 @@ class DebugMode : public IMode
public:
DebugMode() : m_widget(0) { setObjectName(QLatin1String("DebugMode")); }
~DebugMode()
{
// Make sure the editor manager does not get deleted.
~DebugMode() { EditorManager::instance()->setParent(0); }
//EditorManager::instance()->setParent(0);
delete m_widget;
}
// IMode
QString displayName() const { return DebuggerPlugin::tr("Debug"); }
......@@ -1420,16 +1424,16 @@ DebuggerPluginPrivate::~DebuggerPluginPrivate()
delete m_debuggerSettings;
m_debuggerSettings = 0;
m_plugin->removeObject(theDebuggerCore->m_debugMode);
delete m_debugMode;
m_debugMode = 0;
m_plugin->removeObject(m_mainWindow);
delete m_mainWindow;
m_mainWindow = 0;
delete m_snapshotHandler;
m_snapshotHandler = 0;
m_plugin->removeObject(theDebuggerCore->m_debugMode);
delete m_debugMode;
m_debugMode = 0;
}
DebuggerCore *debuggerCore()
......@@ -1451,7 +1455,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
// Cpp/Qml ui setup
m_mainWindow = new DebuggerMainWindow;
ExtensionSystem::PluginManager::instance()->addObject(m_mainWindow);
m_plugin->addObject(m_mainWindow);
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment