fix exception in webtorrent process

This commit is contained in:
Feross Aboukhadijeh
2016-04-28 12:10:24 +02:00
parent 011ab13c83
commit ef51f827dc

View File

@@ -90,7 +90,7 @@ function startTorrenting (torrentKey, torrentID, path, fileModtimes) {
function stopTorrenting (infoHash) {
var torrent = client.get(infoHash)
torrent.destroy()
if (torrent) torrent.destroy()
}
// Create a new torrent, start seeding