From 5b47a762ac616f78b7bc18d14bf285128c3a94de Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 17 Oct 2010 15:00:31 +0000 Subject: [PATCH] Fix crash on torrent addition caused by last commit --- src/qtlibtorrent/qbtsession.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index 0835d5463..50ae8f337 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -885,8 +885,8 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed) { //Getting fast resume data if existing bool fastResume = false; + std::vector buf; // Needs to stay in the function scope if(resumed) { - std::vector buf; if(loadFastResumeData(hash, buf)) { fastResume = true; p.resume_data = &buf; @@ -1039,8 +1039,8 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr // Get fast resume data if existing bool fastResume = false; + std::vector buf; // Needs to stay in the function scope if(resumed) { - std::vector buf; if(loadFastResumeData(hash, buf)) { fastResume = true; p.resume_data = &buf;