mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-12 11:20:09 +00:00
Prevent exception when clicking on the Connect button when no host is selected
This commit is contained in:
parent
12dded627e
commit
62b0d0b094
1 changed files with 2 additions and 0 deletions
|
@ -380,6 +380,8 @@ class ConnectionManager(component.Component):
|
||||||
|
|
||||||
def on_button_connect_clicked(self, widget=None):
|
def on_button_connect_clicked(self, widget=None):
|
||||||
model, row = self.hostlist.get_selection().get_selected()
|
model, row = self.hostlist.get_selection().get_selected()
|
||||||
|
if not row:
|
||||||
|
return
|
||||||
status = model[row][HOSTLIST_COL_STATUS]
|
status = model[row][HOSTLIST_COL_STATUS]
|
||||||
if status == "Connected":
|
if status == "Connected":
|
||||||
def on_disconnect(reason):
|
def on_disconnect(reason):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue