From e99d907c72756fb7bc10396a7b77134af2586b9b Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 2 Jan 2017 00:01:43 -0500 Subject: [PATCH] fix assert --- src/disk_io_thread.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index db1a6eb1b..3eda477c9 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -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 = m_torrents[st]; - std::unique_lock l(m_cache_mutex); #ifndef TORRENT_NO_DEPRECATE @@ -2658,6 +2656,7 @@ namespace libtorrent if (!session) { + std::shared_ptr storage = m_torrents[st]; TORRENT_ASSERT(storage); ret->pieces.reserve(storage->num_pieces());