mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
Fix crash when accessing trackers and using libtorrent v0.15.x
This commit is contained in:
parent
dbfef8665b
commit
902196a176
@ -302,7 +302,7 @@ size_type QTorrentHandle::filesize_at(unsigned int index) const {
|
||||
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());
|
||||
return h.trackers();
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ class QTorrentHandle {
|
||||
bool is_queued() const;
|
||||
QString file_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;
|
||||
QString creator() const;
|
||||
QString comment() const;
|
||||
|
@ -231,7 +231,7 @@ void TrackerList::loadTrackers() {
|
||||
// Load actual trackers information
|
||||
QHash<QString, TrackerInfos> trackers_data = properties->getBTSession()->getTrackersInfo(h.hash());
|
||||
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++) {
|
||||
QString tracker_url = misc::toQString(it->url);
|
||||
QTreeWidgetItem *item = tracker_items.value(tracker_url, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user