(trunk libT) fix a crasher introduced yesterday in r12248

This commit is contained in:
Jordan Lee 2011-03-29 21:10:20 +00:00
parent 72c55fcdd8
commit 3e2aee0c02
1 changed files with 2 additions and 3 deletions

View File

@ -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 )
{