From 3e2aee0c0231da4dd8557b65b0367732c01acf54 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Tue, 29 Mar 2011 21:10:20 +0000 Subject: [PATCH] (trunk libT) fix a crasher introduced yesterday in r12248 --- libtransmission/peer-mgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 865c8eb30..8d55573c7 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -421,8 +421,7 @@ tr_peerDestruct( tr_torrent * tor, tr_peer * peer ) { assert( peer != NULL ); - if( tor->torrentPeers->isRunning ) - peerDeclinedAllRequests( tor->torrentPeers, peer ); + peerDeclinedAllRequests( tor->torrentPeers, peer ); if( peer->msgs != NULL ) tr_peerMsgsFree( peer->msgs ); @@ -1471,9 +1470,9 @@ refillUpkeep( int foo UNUSED, short bar UNUSED, void * vmgr ) { int keepCount = 0; int cancelCount = 0; - struct block_request * cancel = tr_new( struct block_request, n ); const struct block_request * it; const struct block_request * end; + struct block_request * cancel = tr_new( struct block_request, n ); for( it=t->requests, end=it+n; it!=end; ++it ) {