mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-22 04:24:51 +00:00
dont crash on empty tracker list
This commit is contained in:
parent
ebe0ac39d9
commit
fced9a2c71
1 changed files with 7 additions and 2 deletions
|
@ -1831,8 +1831,13 @@ static PyObject *torrent_replace_trackers(PyObject *self, PyObject *args)
|
|||
libtorrent::announce_entry a_entry(line);
|
||||
trackerlist.push_back(a_entry);
|
||||
}
|
||||
M_torrents->at(index).handle.replace_trackers(trackerlist);
|
||||
M_torrents->at(index).handle.force_reannounce();
|
||||
if (trackerlist.empty()){
|
||||
printf("libtorrent didnt like that...trackers cant be empty");
|
||||
}
|
||||
else{
|
||||
M_torrents->at(index).handle.replace_trackers(trackerlist);
|
||||
M_torrents->at(index).handle.force_reannounce();
|
||||
}
|
||||
}
|
||||
Py_INCREF(Py_None); return Py_None;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue