mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
- Fix a crash when adding an already existing torrent
This commit is contained in:
parent
bccdad4b1b
commit
e4bf116ce8
@ -982,7 +982,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
|
|||||||
// and add them
|
// and add them
|
||||||
QTorrentHandle h_ex = getTorrentHandle(hash);
|
QTorrentHandle h_ex = getTorrentHandle(hash);
|
||||||
if(h_ex.is_valid()) {
|
if(h_ex.is_valid()) {
|
||||||
std::vector<announce_entry> old_trackers = h.trackers();
|
std::vector<announce_entry> old_trackers = h_ex.trackers();
|
||||||
std::vector<announce_entry> new_trackers = t->trackers();
|
std::vector<announce_entry> new_trackers = t->trackers();
|
||||||
bool trackers_added = false;
|
bool trackers_added = false;
|
||||||
for(std::vector<announce_entry>::iterator it=new_trackers.begin();it!=new_trackers.end();it++) {
|
for(std::vector<announce_entry>::iterator it=new_trackers.begin();it!=new_trackers.end();it++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user