summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Lanham <nick@afternight.org>2011-04-26 14:18:25 +0200
committerNick Lanham <nick@afternight.org>2011-04-26 14:18:25 +0200
commite992ac3eab02ec59c68f59fc401600c98c408507 (patch)
tree67be57cf447b2c674bf7e0ed0b1a1cd3a66f4230
parentd05352db65122cd2c79e97343cfa8120095fa40f (diff)
downloaddeluge-e992ac3eab02ec59c68f59fc401600c98c408507.tar.gz
deluge-e992ac3eab02ec59c68f59fc401600c98c408507.tar.bz2
deluge-e992ac3eab02ec59c68f59fc401600c98c408507.zip
ignore key presses that only makes sense when we have a state when we don't have a state
-rw-r--r--deluge/ui/console/modes/torrentdetail.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/deluge/ui/console/modes/torrentdetail.py b/deluge/ui/console/modes/torrentdetail.py
index 39f77371a..0b585b5d4 100644
--- a/deluge/ui/console/modes/torrentdetail.py
+++ b/deluge/ui/console/modes/torrentdetail.py
@@ -482,6 +482,10 @@ class TorrentDetail(BaseMode, component.Component):
self.back_to_overview()
return
+ if not self.torrent_state:
+ # actions below only makes sense if there is a torrent state
+ return
+
# Navigate the torrent list
if c == curses.KEY_UP:
self.file_list_up()