(trunk libT) fix peerDestruct() crash when peer doesn't have a corresponding atom
This commit is contained in:
parent
d0a7d08b13
commit
a1b81cd152
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue