Fix crash on prev/next change
When the currently displayed change was not arrived at from a query listing (for example, was directly opened), there may be no change list to find in the navigation history. Don't try to use it if that's the case. Change-Id: I6fdb1ed2e16675bf1be3726b836130b695225b6b
This commit is contained in:
parent
7d5b02d9af
commit
954ca7dfb0
@ -735,11 +735,13 @@ class ChangeView(urwid.WidgetWrap):
|
|||||||
return None
|
return None
|
||||||
if keymap.SEARCH_RESULTS in commands:
|
if keymap.SEARCH_RESULTS in commands:
|
||||||
widget = self.app.findChangeList()
|
widget = self.app.findChangeList()
|
||||||
|
if widget:
|
||||||
self.app.backScreen(widget)
|
self.app.backScreen(widget)
|
||||||
return None
|
return None
|
||||||
if ((keymap.NEXT_CHANGE in commands) or
|
if ((keymap.NEXT_CHANGE in commands) or
|
||||||
(keymap.PREV_CHANGE in commands)):
|
(keymap.PREV_CHANGE in commands)):
|
||||||
widget = self.app.findChangeList()
|
widget = self.app.findChangeList()
|
||||||
|
if widget:
|
||||||
if keymap.NEXT_CHANGE in commands:
|
if keymap.NEXT_CHANGE in commands:
|
||||||
new_change_key = widget.getNextChangeKey(self.change_key)
|
new_change_key = widget.getNextChangeKey(self.change_key)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user