From a282a51c4dac9db4e422695df46022c97fb62a38 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 16 Sep 2004 12:12:36 +0000 Subject: [PATCH] *** empty log message *** --- include/libtorrent/torrent.hpp | 5 +---- src/storage.cpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index ee6caeded..99dce9372 100755 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -115,10 +115,7 @@ namespace libtorrent // loop in session_impl will check for this state // on all torrents once every second, and take // the necessary actions then. - void abort() - { - m_abort = true; m_event = tracker_request::stopped; - } + void abort() { m_abort = true; m_event = tracker_request::stopped; } bool is_aborted() const { return m_abort; } // is called every second by session. This will diff --git a/src/storage.cpp b/src/storage.cpp index 309de28ab..0fd26dfc5 100755 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -1223,7 +1223,7 @@ namespace libtorrent { boost::mutex::scoped_lock lock(mutex); data.progress = (float)current_slot / m_info.num_pieces(); - if (data.abort || data.torrent_ptr->is_aborted()) + if (data.abort || (data.torrent_ptr && data.torrent_ptr->is_aborted())) return; } }