Commit d6f23d36 authored by Eike Ziller's avatar Eike Ziller
Browse files

Editors: Fix crash when closing empty editor window

Restoring a session removes all "external" editor areas. For simplicity
the editor manager only manages the editor areas, not the windows
themselves. So an editor window must take care of closing itself when
its editor area gets cleaned up.

Change-Id: I619f95376ef980d4c318b966427ebf4b2f78ca31
Task-number: QTCREATORBUG-15193
Reviewed-by: default avatarRobert Loehning <>
Reviewed-by: default avatarDavid Schulz <>
parent 2c3f3970
......@@ -60,13 +60,18 @@ EditorWindow::EditorWindow(QWidget *parent) :
connect(m_area, &EditorArea::windowTitleNeedsUpdate,
this, &EditorWindow::updateWindowTitle);
// editor area can be deleted by editor manager
connect(m_area, &EditorArea::destroyed, this, [this]() {
m_area = nullptr;
disconnect(m_area, &EditorArea::windowTitleNeedsUpdate,
this, &EditorWindow::updateWindowTitle);
if (m_area)
disconnect(m_area, 0, this, 0);
EditorArea *EditorWindow::editorArea() const
Supports Markdown
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