summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/coreplugin')
-rw-r--r--src/plugins/coreplugin/editormanager/documentmodel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp
index 10960e4793..fb6bf68949 100644
--- a/src/plugins/coreplugin/editormanager/documentmodel.cpp
+++ b/src/plugins/coreplugin/editormanager/documentmodel.cpp
@@ -367,6 +367,7 @@ DocumentModel::Entry *DocumentModelPrivate::removeEditor(IEditor *editor)
QTC_ASSERT(d->m_editors.contains(document), return nullptr);
d->m_editors[document].removeAll(editor);
DocumentModel::Entry *entry = DocumentModel::entryForDocument(document);
+ QTC_ASSERT(entry, return nullptr);
if (d->m_editors.value(document).isEmpty()) {
d->m_editors.remove(document);
entry->document = new IDocument;