Fixed an issue in DisViewer. eric7

Thu, 14 Apr 2022 08:53:34 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 14 Apr 2022 08:53:34 +0200
branch
eric7
changeset 9026
2cba3f220ef5
parent 9025
9fe8cfa14542
child 9027
f259edcf185a

Fixed an issue in DisViewer.

eric7/UI/PythonDisViewer.py file | annotate | diff | comparison | revisions
--- a/eric7/UI/PythonDisViewer.py	Wed Apr 13 19:49:25 2022 +0200
+++ b/eric7/UI/PythonDisViewer.py	Thu Apr 14 08:53:34 2022 +0200
@@ -385,7 +385,7 @@
         if instr.starts_line:
             itm.setData(0, self.StartLineRole, instr.starts_line)
             itm.setData(0, self.EndLineRole, instr.starts_line)
-        else:
+        elif parent is not None:
             # get line from parent (= start line)
             lineno = parent.data(0, self.StartLineRole)
             itm.setData(0, self.StartLineRole, lineno)

eric ide

mercurial