summaryrefslogtreecommitdiffstats
path: root/avahi-python/avahi-discover/avahi-discover.in
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-python/avahi-discover/avahi-discover.in')
-rwxr-xr-xavahi-python/avahi-discover/avahi-discover.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/avahi-python/avahi-discover/avahi-discover.in b/avahi-python/avahi-discover/avahi-discover.in
index 229c7bd..be8c08b 100755
--- a/avahi-python/avahi-discover/avahi-discover.in
+++ b/avahi-python/avahi-discover/avahi-discover.in
@@ -61,7 +61,9 @@ class Main_window(SimpleGladeApp):
def on_tree_view_cursor_changed(self, widget, *args):
(model, iter) = widget.get_selection().get_selected()
- (name,interface,protocol,stype,domain) = self.treemodel.get(iter,1,2,3,4,5)
+ stype = None
+ if iter is not None:
+ (name,interface,protocol,stype,domain) = self.treemodel.get(iter,1,2,3,4,5)
if stype == None:
self.info_label.set_markup("<i>No service currently selected.</i>")
return