Fix crash when the selected torrent disappears from the transfer list. Closes #1661