aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/editormanager/editormanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/coreplugin/editormanager/editormanager.cpp')
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 39271a21675..21f032904c7 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -1201,10 +1201,12 @@ IEditor *EditorManager::openEditorWithContents(const QString &editorKind,
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
IEditor *edt = createEditor(editorKind);
- if (!edt)
+ if (!edt) {
+ QApplication::restoreOverrideCursor();
return 0;
+ }
- if (!edt || !edt->createNew(contents)) {
+ if (!edt->createNew(contents)) {
QApplication::restoreOverrideCursor();
delete edt;
edt = 0;