mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Fix crash when accessing trackers and using libtorrent v0.15.x
This commit is contained in:
parent
dbfef8665b
commit
902196a176
3 changed files with 3 additions and 3 deletions
|
@ -302,7 +302,7 @@ size_type QTorrentHandle::filesize_at(unsigned int index) const {
|
||||||
return h.get_torrent_info().file_at(index).size;
|
return h.get_torrent_info().file_at(index).size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<announce_entry>& QTorrentHandle::trackers() const {
|
const std::vector<announce_entry> QTorrentHandle::trackers() const {
|
||||||
Q_ASSERT(h.is_valid());
|
Q_ASSERT(h.is_valid());
|
||||||
return h.trackers();
|
return h.trackers();
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ class QTorrentHandle {
|
||||||
bool is_queued() const;
|
bool is_queued() const;
|
||||||
QString file_at(unsigned int index) const;
|
QString file_at(unsigned int index) const;
|
||||||
size_type filesize_at(unsigned int index) const;
|
size_type filesize_at(unsigned int index) const;
|
||||||
const std::vector<announce_entry>& trackers() const;
|
const std::vector<announce_entry> trackers() const;
|
||||||
torrent_status::state_t state() const;
|
torrent_status::state_t state() const;
|
||||||
QString creator() const;
|
QString creator() const;
|
||||||
QString comment() const;
|
QString comment() const;
|
||||||
|
|
|
@ -231,7 +231,7 @@ void TrackerList::loadTrackers() {
|
||||||
// Load actual trackers information
|
// Load actual trackers information
|
||||||
QHash<QString, TrackerInfos> trackers_data = properties->getBTSession()->getTrackersInfo(h.hash());
|
QHash<QString, TrackerInfos> trackers_data = properties->getBTSession()->getTrackersInfo(h.hash());
|
||||||
QStringList old_trackers_urls = tracker_items.keys();
|
QStringList old_trackers_urls = tracker_items.keys();
|
||||||
const std::vector<announce_entry> &trackers = h.trackers();
|
const std::vector<announce_entry> trackers = h.trackers();
|
||||||
for(std::vector<announce_entry>::const_iterator it = trackers.begin(); it != trackers.end(); it++) {
|
for(std::vector<announce_entry>::const_iterator it = trackers.begin(); it != trackers.end(); it++) {
|
||||||
QString tracker_url = misc::toQString(it->url);
|
QString tracker_url = misc::toQString(it->url);
|
||||||
QTreeWidgetItem *item = tracker_items.value(tracker_url, 0);
|
QTreeWidgetItem *item = tracker_items.value(tracker_url, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue