From d855bcc8152b50651e71ddeafa3bfab8c72fe00c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 25 May 2011 16:06:51 +0000 Subject: [PATCH] fix potential crash when peers get disconnected when we announce pieces to them --- src/torrent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 56cd79f26..747d5a207 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -2825,7 +2825,7 @@ namespace libtorrent for (peer_iterator i = m_connections.begin(); i != m_connections.end();) { - peer_connection* p = *i; + intrusive_ptr p = *i; ++i; p->announce_piece(index); }