fix assert

This commit is contained in:
arvidn 2017-01-02 00:01:43 -05:00
parent 4ebc344e48
commit e99d907c72
1 changed files with 1 additions and 2 deletions

View File

@ -2603,8 +2603,6 @@ namespace libtorrent
void disk_io_thread::get_cache_info(cache_status* ret, storage_index_t st
, bool const no_pieces, bool const session) const
{
std::shared_ptr<storage_interface> storage = m_torrents[st];
std::unique_lock<std::mutex> l(m_cache_mutex);
#ifndef TORRENT_NO_DEPRECATE
@ -2658,6 +2656,7 @@ namespace libtorrent
if (!session)
{
std::shared_ptr<storage_interface> storage = m_torrents[st];
TORRENT_ASSERT(storage);
ret->pieces.reserve(storage->num_pieces());