changeset 40413:7e4ffe2719e4 stable

crecord: make nextsametype() check that parent item exists (issue6009) Items that represent files in curses interface don't have parents.
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 25 Oct 2018 21:33:43 +0800
parents e928bedf0919
children 588f1e9a4d16
files mercurial/crecord.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/crecord.py	Wed Oct 24 10:05:13 2018 -0400
+++ b/mercurial/crecord.py	Thu Oct 25 21:33:43 2018 +0800
@@ -725,7 +725,7 @@
             nextitem = currentitem
         else:
             parent = nextitem.parentitem()
-            if parent.folded:
+            if parent is not None and parent.folded:
                 self.togglefolded(parent)
 
         self.currentselecteditem = nextitem