forked from premiere/premiere-libtorrent
fixed potential problem in storage where it sometimes checks files without first initializing
This commit is contained in:
parent
aced1fcac3
commit
eb1de9d9eb
|
@ -1900,6 +1900,8 @@ namespace libtorrent
|
||||||
// is finished
|
// is finished
|
||||||
int piece_manager::check_files(int& current_slot, int& have_piece, std::string& error)
|
int piece_manager::check_files(int& current_slot, int& have_piece, std::string& error)
|
||||||
{
|
{
|
||||||
|
if (m_state == state_none) return check_no_fastresume(error);
|
||||||
|
|
||||||
TORRENT_ASSERT(int(m_piece_to_slot.size()) == m_files.num_pieces());
|
TORRENT_ASSERT(int(m_piece_to_slot.size()) == m_files.num_pieces());
|
||||||
|
|
||||||
current_slot = m_current_slot;
|
current_slot = m_current_slot;
|
||||||
|
|
Loading…
Reference in New Issue