From 6047e42c16086c9d62e584ca89ac9149a594dfd7 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 28 Dec 2017 15:35:34 +0100 Subject: [PATCH] fix torrent invariant when creating the piece picker fails --- src/torrent.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 58f7107dd..901603539 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -1234,14 +1234,11 @@ namespace libtorrent { , blocks_in_last_piece , m_torrent_file->num_pieces())); - m_picker = std::move(pp); - // initialize the file progress too if (m_file_progress.empty()) - { - TORRENT_ASSERT(has_picker()); - m_file_progress.init(picker(), m_torrent_file->files()); - } + m_file_progress.init(*pp, m_torrent_file->files()); + + m_picker = std::move(pp); update_gauge();