From ef51f827dce4a3d94b10f6f1cba460096d1d5b58 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 28 Apr 2016 12:10:24 +0200 Subject: [PATCH] fix exception in webtorrent process --- renderer/webtorrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderer/webtorrent.js b/renderer/webtorrent.js index 26338ac2..d90458fc 100644 --- a/renderer/webtorrent.js +++ b/renderer/webtorrent.js @@ -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