From 699f93c4dc23d3714f3fa0dc861c403c8395965b Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Sun, 20 Jul 2008 21:17:00 +0000 Subject: [PATCH] fix error on empty labels-list --- deluge/plugins/label/label/gtkui/label_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/plugins/label/label/gtkui/label_config.py b/deluge/plugins/label/label/gtkui/label_config.py index 33ed868f5..1a4215518 100644 --- a/deluge/plugins/label/label/gtkui/label_config.py +++ b/deluge/plugins/label/label/gtkui/label_config.py @@ -98,7 +98,8 @@ class LabelConfig(object): self.label_store.clear() for label in labels: self.label_store.append([label]) - self.label_view.get_selection().select_iter(self.label_store.get_iter_first()) + if labels: + self.label_view.get_selection().select_iter(self.label_store.get_iter_first()) def cb_label_options(self, data): for key in ["max_download_speed", "max_upload_speed", "max_connections" ,"max_upload_slots"]: