Commit 4fa52881 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger: Fix exit crash in debug mode (X11).

Double deletion of debug mode widgets.
parent 8dc563cd
...@@ -79,8 +79,10 @@ NavigationWidgetPlaceHolder::NavigationWidgetPlaceHolder(Core::IMode *mode, QWid ...@@ -79,8 +79,10 @@ NavigationWidgetPlaceHolder::NavigationWidgetPlaceHolder(Core::IMode *mode, QWid
NavigationWidgetPlaceHolder::~NavigationWidgetPlaceHolder() NavigationWidgetPlaceHolder::~NavigationWidgetPlaceHolder()
{ {
if (m_current == this) { if (m_current == this) {
NavigationWidget::instance()->setParent(0); if (NavigationWidget *nw = NavigationWidget::instance()) {
NavigationWidget::instance()->hide(); nw->setParent(0);
nw->hide();
}
} }
} }
......
...@@ -507,6 +507,7 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode) ...@@ -507,6 +507,7 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
splitter->addWidget(mainWindowSplitter); splitter->addWidget(mainWindowSplitter);
splitter->setStretchFactor(0, 0); splitter->setStretchFactor(0, 0);
splitter->setStretchFactor(1, 1); splitter->setStretchFactor(1, 1);
splitter->setObjectName(QLatin1String("DebugModeWidget"));
return splitter; return splitter;
} }
......
...@@ -1117,8 +1117,7 @@ DebuggerPluginPrivate::~DebuggerPluginPrivate() ...@@ -1117,8 +1117,7 @@ DebuggerPluginPrivate::~DebuggerPluginPrivate()
delete m_debuggerSettings; delete m_debuggerSettings;
m_debuggerSettings = 0; m_debuggerSettings = 0;
delete m_mainWindow; // Mainwindow will be deleted by debug mode.
m_mainWindow = 0;
delete m_snapshotHandler; delete m_snapshotHandler;
m_snapshotHandler = 0; m_snapshotHandler = 0;
......
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