From dde58e80d7a0b58c36b6995b119343ac7f2611b1 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 18 Jul 2008 23:06:04 +0000 Subject: [PATCH] Fix starting if tabs.state does not exist --- deluge/ui/gtkui/torrentdetails.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/deluge/ui/gtkui/torrentdetails.py b/deluge/ui/gtkui/torrentdetails.py index 1ad9f9d51..4ea5cffec 100644 --- a/deluge/ui/gtkui/torrentdetails.py +++ b/deluge/ui/gtkui/torrentdetails.py @@ -111,11 +111,12 @@ class TorrentDetails(component.Component): # Get the state from saved file state = self.load_state() - for item in state: - if not isinstance(item, tuple): - log.debug("Old tabs.state, using default..") - state = None - break + if state: + for item in state: + if not isinstance(item, tuple): + log.debug("Old tabs.state, using default..") + state = None + break # The state is a list of tab_names in the order they should appear if state == None: