From 62b0d0b094fcc829851aa8018317dab557ce1610 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 1 May 2009 17:28:57 +0000 Subject: [PATCH] Prevent exception when clicking on the Connect button when no host is selected --- deluge/ui/gtkui/connectionmanager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index f744bddbf..de2c38bda 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -380,6 +380,8 @@ class ConnectionManager(component.Component): def on_button_connect_clicked(self, widget=None): model, row = self.hostlist.get_selection().get_selected() + if not row: + return status = model[row][HOSTLIST_COL_STATUS] if status == "Connected": def on_disconnect(reason):