diff --git a/pyqode/core/modes/outline.py b/pyqode/core/modes/outline.py
index <HASH>..<HASH> 100644
--- a/pyqode/core/modes/outline.py
+++ b/pyqode/core/modes/outline.py
@@ -53,8 +53,12 @@ class OutlineMode(Mode, QtCore.QObject):
         self._jobRunner.request_job(self._run_analysis)
 
     def _run_analysis(self):
-        if self.enabled and self.editor and self.editor.toPlainText() and \
-                self.editor.file:
+        try:
+            self.editor.toPlainText()
+        except RuntimeError:
+            # called by the timer after the editor got deleted
+            return
+        if self.enabled and self.editor.file:
             request_data = {
                 'code': self.editor.toPlainText(),
                 'path': self.editor.file.path,
Fix runtime error if editor got deleted before running the analysis

This happen in OpenCobolIDE if user quickly open and close the preferences dialog.