From ab7d8a8fc1b68e4a8d4cd0d2d9d2c471a7801d2a Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 16 Apr 2018 09:04:04 +0200 Subject: [PATCH] Fix potential nullptr access in editor manager Introduced recently in f1e02c0826f Change-Id: I9cae829c6c58ed30021b7c29fcde7487bf2ff625 Reviewed-by: Orgad Shaneh --- src/plugins/coreplugin/editormanager/editormanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"));