From 18091c5ad6fc1bbabad3511cb7d1da5f6307d749 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Wed, 30 May 2012 21:06:50 +0200 Subject: [PATCH] Fixed an error that arised when no torrents matched current filter --- deluge/ui/console/modes/alltorrents.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index c4bcc3bca..bbafec8d5 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -499,6 +499,9 @@ class AllTorrents(BaseMode, component.Component): def _sort_torrents(self, state): "sorts by primary and secondary sort fields" + if not state: + return {} + s_primary = self.config["sort_primary"] s_secondary = self.config["sort_secondary"]