fix issue in session_impl::remove_torrent which would cause it to throw

This commit is contained in:
Arvid Norberg
2011-06-21 02:02:58 +00:00
parent 39a68729a5
commit de799e1100
3 changed files with 12 additions and 7 deletions

View File

@@ -4232,12 +4232,8 @@ namespace aux {
void session_impl::remove_torrent(const torrent_handle& h, int options)
{
boost::shared_ptr<torrent> tptr = h.m_torrent.lock();
if (!tptr)
#ifdef BOOST_NO_EXCEPTIONS
return;
#else
throw_invalid_handle();
#endif
if (!tptr) return;
remove_torrent_impl(tptr, options);
if (m_alerts.should_post<torrent_removed_alert>())