mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
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.
This commit is contained in:
parent
d6829b253b
commit
105874613a
1 changed files with 1 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue