diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index ace50be9855..bf09d4eed3f 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -2400,7 +2400,7 @@ void EditorManager::addSaveAndCloseEditorActions(QMenu *contextMenu, DocumentMod contextMenu->addSeparator(); - const QString quotedDisplayName = Utils::quoteAmpersands(entry->displayName()); + const QString quotedDisplayName = entry ? Utils::quoteAmpersands(entry->displayName()) : QString(); d->m_closeCurrentEditorContextAction->setText(entry ? tr("Close \"%1\"").arg(quotedDisplayName) : tr("Close Editor"));