Fixed an issue in the editor causing a traceback when setting a language for an empty editor. 6_0_x

Wed, 11 Mar 2015 18:25:37 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 11 Mar 2015 18:25:37 +0100
branch
6_0_x
changeset 4171
97591cba48c0
parent 4169
fcd66c0f39e1
child 4174
610bdc92efdf

Fixed an issue in the editor causing a traceback when setting a language for an empty editor.
(grafted from 8bc578136279a8d9c2d249e6d2811ff8a7b93a45)

QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/QScintilla/Editor.py	Tue Mar 10 20:20:46 2015 +0100
+++ b/QScintilla/Editor.py	Wed Mar 11 18:25:37 2015 +0100
@@ -1508,7 +1508,8 @@
                 language = Preferences.getEditorLexerAssoc(basename)
             if not language:
                 bindName = self.__bindName(self.text(0))
-                language = Preferences.getEditorLexerAssoc(bindName)
+                if bindName:
+                    language = Preferences.getEditorLexerAssoc(bindName)
             if language == "Python":
                 # correction for Python
                 pyVer = Utilities.determinePythonVersion(

eric ide

mercurial