Fix crash when opening a torrent/magnet from the desktop