error handling fixes

This commit is contained in:
Arvid Norberg
2008-01-16 21:07:04 +00:00
parent 832c0c8b63
commit c69fa07e2d
2 changed files with 5 additions and 2 deletions

View File

@@ -1789,7 +1789,8 @@ namespace libtorrent
INVARIANT_CHECK;
boost::shared_ptr<torrent> t = m_torrent.lock();
TORRENT_ASSERT(t);
// this peer might be disconnecting
if (!t) return;
TORRENT_ASSERT(t->valid_metadata());