Fix potential nullptr access in editor manager

Introduced recently in f1e02c0826

Change-Id: I9cae829c6c58ed30021b7c29fcde7487bf2ff625
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2018-04-16 09:04:04 +02:00
parent 16cf54f6e9
commit ab7d8a8fc1

View File

@@ -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"));