(trunk libT) fix peerDestruct() crash when peer doesn't have a corresponding atom

This commit is contained in:
Jordan Lee 2011-03-04 04:45:12 +00:00
parent d0a7d08b13
commit a1b81cd152
1 changed files with 3 additions and 1 deletions

View File

@ -446,6 +446,8 @@ tr_peerDestruct( tr_torrent * tor, tr_peer * peer )
tr_bitsetDestruct( &peer->have ); tr_bitsetDestruct( &peer->have );
tr_bitfieldFree( peer->blame ); tr_bitfieldFree( peer->blame );
tr_free( peer->client ); tr_free( peer->client );
if( peer->atom )
peer->atom->peer = NULL; peer->atom->peer = NULL;
} }