dont crash on empty tracker list
This commit is contained in:
parent
ebe0ac39d9
commit
fced9a2c71
@ -1831,9 +1831,14 @@ static PyObject *torrent_replace_trackers(PyObject *self, PyObject *args)
|
||||
libtorrent::announce_entry a_entry(line);
|
||||
trackerlist.push_back(a_entry);
|
||||
}
|
||||
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;
|
||||
}
|
||||
static PyObject *torrent_prioritize_files(PyObject *self, PyObject *args)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user