fix bug for when a torrent queued for checking was removed

This commit is contained in:
Arvid Norberg 2008-10-26 04:10:27 +00:00
parent 2c4ee11f30
commit 8f7a3ddfe0
1 changed files with 3 additions and 0 deletions

View File

@ -1893,6 +1893,9 @@ namespace aux {
#endif #endif
i->second->set_queue_position(-1); i->second->set_queue_position(-1);
m_torrents.erase(i); m_torrents.erase(i);
std::list<boost::shared_ptr<torrent> >::iterator k
= std::find(m_queued_for_checking.begin(), m_queued_for_checking.end(), tptr);
if (k != m_queued_for_checking.end()) m_queued_for_checking.erase(k);
TORRENT_ASSERT(m_torrents.find(i_hash) == m_torrents.end()); TORRENT_ASSERT(m_torrents.find(i_hash) == m_torrents.end());
return; return;
} }