diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index e898895f39a..2f1cc62df80 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1161,9 +1161,8 @@ bool EditorManager::closeEditors(const QList &editorsToClose, bool ask emit editorsClosed(acceptedEditors); - foreach (IEditor *editor, acceptedEditors) { - delete editor; - } + foreach (IEditor *editor, acceptedEditors) + editor->deleteLater(); if (currentView) { if (IEditor *editor = currentView->currentEditor())