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:
James E. Blair 2014-09-05 13:26:09 -07:00
parent 7d5b02d9af
commit 954ca7dfb0

View File

@ -735,11 +735,13 @@ class ChangeView(urwid.WidgetWrap):
return None
if keymap.SEARCH_RESULTS in commands:
widget = self.app.findChangeList()
if widget:
self.app.backScreen(widget)
return None
if ((keymap.NEXT_CHANGE in commands) or
(keymap.PREV_CHANGE in commands)):
widget = self.app.findChangeList()
if widget:
if keymap.NEXT_CHANGE in commands:
new_change_key = widget.getNextChangeKey(self.change_key)
else: