From a7495fa7b403065743589df1aa5e6ea264673157 Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Fri, 13 May 2016 20:35:02 +0200 Subject: [PATCH] Fix crash when adding torrent via a magnet url The file guard object has to be initialised in this case too because it is accessed when dialog gets accepted or cancelled. Initialise it with empty path. --- src/gui/addnewtorrentdialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index df8812ea1..345ac7581 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -259,6 +259,7 @@ bool AddNewTorrentDialog::loadMagnet(const BitTorrent::MagnetUri &magnetUri) return false; } + m_torrentGuard.reset(new TorrentFileGuard(QString())); m_hash = magnetUri.hash(); // Prevent showing the dialog if download is already present if (BitTorrent::Session::instance()->isKnownTorrent(m_hash)) {