fix torrent invariant when creating the piece picker fails
This commit is contained in:
parent
0eec9194db
commit
6047e42c16
|
@ -1234,14 +1234,11 @@ namespace libtorrent {
|
||||||
, blocks_in_last_piece
|
, blocks_in_last_piece
|
||||||
, m_torrent_file->num_pieces()));
|
, m_torrent_file->num_pieces()));
|
||||||
|
|
||||||
m_picker = std::move(pp);
|
|
||||||
|
|
||||||
// initialize the file progress too
|
// initialize the file progress too
|
||||||
if (m_file_progress.empty())
|
if (m_file_progress.empty())
|
||||||
{
|
m_file_progress.init(*pp, m_torrent_file->files());
|
||||||
TORRENT_ASSERT(has_picker());
|
|
||||||
m_file_progress.init(picker(), m_torrent_file->files());
|
m_picker = std::move(pp);
|
||||||
}
|
|
||||||
|
|
||||||
update_gauge();
|
update_gauge();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue