ignore key presses that only makes sense when we have a state when we don't have a state

This commit is contained in:
Nick Lanham 2011-04-26 14:18:25 +02:00
parent d05352db65
commit e992ac3eab
1 changed files with 4 additions and 0 deletions

View File

@ -482,6 +482,10 @@ class TorrentDetail(BaseMode, component.Component):
self.back_to_overview() self.back_to_overview()
return return
if not self.torrent_state:
# actions below only makes sense if there is a torrent state
return
# Navigate the torrent list # Navigate the torrent list
if c == curses.KEY_UP: if c == curses.KEY_UP:
self.file_list_up() self.file_list_up()