(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,7 +446,9 @@ tr_peerDestruct( tr_torrent * tor, tr_peer * peer )
tr_bitsetDestruct( &peer->have );
tr_bitfieldFree( peer->blame );
tr_free( peer->client );
peer->atom->peer = NULL;
if( peer->atom )
peer->atom->peer = NULL;
}
static void