diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 517fce78c4c80887ec63c8959c32e2870bc0e166..945d1424e5c0166b236f356a47f01be1613ca26a 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -1131,6 +1131,10 @@ IEditor *EditorManager::openEditor(Core::Internal::EditorView *view, const QStri
     }
     QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
     IEditor *editor = createEditor(editorId, fileName);
+    // If we could not open the file in the requested editor, fall
+    // back to the default editor:
+    if (!editor)
+        editor = createEditor(QString(), fileName);
     if (!editor || !editor->open(fileName)) {
         QApplication::restoreOverrideCursor();
         QMessageBox::critical(m_d->m_core->mainWindow(), tr("Opening File"), tr("Cannot open file %1!").arg(QDir::toNativeSeparators(fileName)));