return if there is no connection selected

This commit is contained in:
Damien Churchill 2009-02-20 20:04:12 +00:00
parent d542666f20
commit 7c3c1fb767
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ Deluge.Connections = {
$clear(Deluge.Connections.running);
Deluge.Connections.Window.hide();
var selected = Deluge.Connections.Grid.getSelectionModel().getSelected();
if (!selected) return;
var id = selected.id;
Deluge.Client.web.connect(id, {
onSuccess: function(methods) {