From 6bb9fb267517fa5f44aaae1df888f14fe682b409 Mon Sep 17 00:00:00 2001 From: dt <qtc-committer@nokia.com> Date: Mon, 12 Apr 2010 17:23:50 +0200 Subject: [PATCH] Fix openEditorWithContents to not crash We don't call EditorManager::openEditorWithContents without a titlepattern, but that would crash --- 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 e59c376efef..42d3e59a23e 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1314,8 +1314,8 @@ IEditor *EditorManager::openEditorWithContents(const QString &editorId, } else { title = *titlePattern; } + *titlePattern = title; } - *titlePattern = title; edt->setDisplayName(title); addEditor(edt); QApplication::restoreOverrideCursor(); -- GitLab