mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Fix off-by-one error when deleting Transmission torrents
This commit is contained in:
parent
135518a341
commit
5bbddcf2ee
@ -102,6 +102,10 @@ func (widget *Widget) currentTorrent() *transmissionrpc.Torrent {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(widget.torrents) <= widget.Selected {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
return widget.torrents[widget.Selected]
|
return widget.torrents[widget.Selected]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user