Browse Source

Fix crash on torrent addition caused by last commit

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
5b47a762ac
  1. 4
      src/qtlibtorrent/qbtsession.cpp

4
src/qtlibtorrent/qbtsession.cpp

@ -885,8 +885,8 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed) { @@ -885,8 +885,8 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed) {
//Getting fast resume data if existing
bool fastResume = false;
std::vector<char> buf; // Needs to stay in the function scope
if(resumed) {
std::vector<char> buf;
if(loadFastResumeData(hash, buf)) {
fastResume = true;
p.resume_data = &buf;
@ -1039,8 +1039,8 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr @@ -1039,8 +1039,8 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr
// Get fast resume data if existing
bool fastResume = false;
std::vector<char> buf; // Needs to stay in the function scope
if(resumed) {
std::vector<char> buf;
if(loadFastResumeData(hash, buf)) {
fastResume = true;
p.resume_data = &buf;

Loading…
Cancel
Save