Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py

branch
5_4_x
changeset 3818
2155e837ee74
parent 3817
0f58961a074f
child 3819
4cef255aef4b
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Sat Sep 27 11:22:39 2014 +0200
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Sat Sep 27 11:34:38 2014 +0200
@@ -475,8 +475,9 @@
                         fname, lineno, position, text = error
                         if lineno > len(source):
                             lineno = len(source)
-                        if lineno == 0 or "__IGNORE_WARNING__" not in \
-                                Utilities.extractLineFlags(
+                        if source and \
+                            "__IGNORE_WARNING__" not in \
+                            Utilities.extractLineFlags(
                                 source[lineno - 1].strip()):
                             self.noResults = False
                             if fixer:

eric ide

mercurial