From b80ced2b3a32890b9cd70022fe4ba74ddd367114 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Wed, 15 Jul 2015 20:37:27 +0300 Subject: [PATCH] Don't add a torrent which doesn't have a matching .torrent file to its .fastresume file. Closes #3346. --- src/core/bittorrent/session.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/bittorrent/session.cpp b/src/core/bittorrent/session.cpp index e41eda0d7..207112fa3 100644 --- a/src/core/bittorrent/session.cpp +++ b/src/core/bittorrent/session.cpp @@ -1092,7 +1092,10 @@ bool Session::addTorrent_impl(const AddTorrentData &addData, const MagnetUri &ma hash = torrentInfo.hash(); } else { - Q_ASSERT(false); + // We can have an invalid torrentInfo when there isn't a matching + // .torrent file to the .fastresume we loaded. Possibly from a + // failed upgrade. + return false; } if (addData.resumed && !fromMagnetUri) {