mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
Fix crash on torrent addition caused by last commit
This commit is contained in:
parent
a5c6bcceea
commit
5b47a762ac
@ -885,8 +885,8 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed) {
|
|||||||
|
|
||||||
//Getting fast resume data if existing
|
//Getting fast resume data if existing
|
||||||
bool fastResume = false;
|
bool fastResume = false;
|
||||||
|
std::vector<char> buf; // Needs to stay in the function scope
|
||||||
if(resumed) {
|
if(resumed) {
|
||||||
std::vector<char> buf;
|
|
||||||
if(loadFastResumeData(hash, buf)) {
|
if(loadFastResumeData(hash, buf)) {
|
||||||
fastResume = true;
|
fastResume = true;
|
||||||
p.resume_data = &buf;
|
p.resume_data = &buf;
|
||||||
@ -1039,8 +1039,8 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr
|
|||||||
|
|
||||||
// Get fast resume data if existing
|
// Get fast resume data if existing
|
||||||
bool fastResume = false;
|
bool fastResume = false;
|
||||||
|
std::vector<char> buf; // Needs to stay in the function scope
|
||||||
if(resumed) {
|
if(resumed) {
|
||||||
std::vector<char> buf;
|
|
||||||
if(loadFastResumeData(hash, buf)) {
|
if(loadFastResumeData(hash, buf)) {
|
||||||
fastResume = true;
|
fastResume = true;
|
||||||
p.resume_data = &buf;
|
p.resume_data = &buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user