summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/editormanager
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-04-16 09:04:04 +0200
committerEike Ziller <eike.ziller@qt.io>2018-04-16 07:36:24 +0000
commitab7d8a8fc1b68e4a8d4cd0d2d9d2c471a7801d2a (patch)
treebb13debafafee8d38dd16f1874db0fb873e3a394 /src/plugins/coreplugin/editormanager
parent16cf54f6e987e90954ebd82acaf019aa7413d4b0 (diff)
downloadqt-creator-ab7d8a8fc1b68e4a8d4cd0d2d9d2c471a7801d2a.tar.gz
Fix potential nullptr access in editor manager
Introduced recently in f1e02c0826f Change-Id: I9cae829c6c58ed30021b7c29fcde7487bf2ff625 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/coreplugin/editormanager')
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index ace50be985..bf09d4eed3 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"));