diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 12a31c7e988985caa697b3e7567d133a4b0cf4c6..dd7b7d183655d398b06d9254789e740d315c23a9 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -554,13 +554,11 @@ IEditor *EditorManager::currentEditor() const
     return m_d->m_currentEditor;
 }
 
-
 void EditorManager::emptyView(Core::Internal::EditorView *view)
 {
     if (!view)
         return;
 
-
     QList<IEditor *> editors = view->editors();
     foreach (IEditor *editor, editors) {
         if (!m_d->m_editorModel->isDuplicate(editor)) {
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index ea9b2ff1648b626c28227f8d776e96521c70d8e7..6a69fc24204ff3e423a711f96f1374be304e5bac 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -650,11 +650,14 @@ void SplitterOrView::mousePressEvent(QMouseEvent *e)
 
 void SplitterOrView::paintEvent(QPaintEvent *)
 {
-    if  (CoreImpl::instance()->editorManager()->currentSplitterOrView() != this)
+    if (CoreImpl::instance()->editorManager()->currentSplitterOrView() != this)
+        return;
+
+    if (!m_view || hasEditors())
         return;
-    QPainter painter(this);
 
-    // Discreet indication where an editor would be
+    // Discreet indication where an editor would be if there is none
+    QPainter painter(this);
     painter.setRenderHint(QPainter::Antialiasing, true);
     painter.setPen(Qt::NoPen);
     QColor shadeBrush(Qt::black);