1
0
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:
Chris Cummer 2019-07-10 08:04:01 -07:00
parent 135518a341
commit 5bbddcf2ee

View File

@ -102,6 +102,10 @@ func (widget *Widget) currentTorrent() *transmissionrpc.Torrent {
return nil
}
if len(widget.torrents) <= widget.Selected {
return nil
}
return widget.torrents[widget.Selected]
}