From eb1de9d9ebe8e5b67617090aa11406a0368e54c8 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 13 Dec 2008 03:32:57 +0000 Subject: [PATCH] fixed potential problem in storage where it sometimes checks files without first initializing --- src/storage.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage.cpp b/src/storage.cpp index fe14efd7a..7b77aafce 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -1900,6 +1900,8 @@ namespace libtorrent // is finished 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()); current_slot = m_current_slot;