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"]