mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
(trunk libT) #4070 "assertion failure happens soon after startup" -- fixed.
Thanks to User294 for helping to track down the problem.
This commit is contained in:
parent
f9c6deab6f
commit
6d94a33f2d
1 changed files with 4 additions and 4 deletions
|
@ -1608,7 +1608,6 @@ peerCallbackFunc( tr_peer * peer, const tr_peer_event * e, void * vt )
|
|||
torrentLock( t );
|
||||
|
||||
assert( peer != NULL );
|
||||
assert( peer->atom != NULL );
|
||||
|
||||
switch( e->eventType )
|
||||
{
|
||||
|
@ -1630,7 +1629,7 @@ peerCallbackFunc( tr_peer * peer, const tr_peer_event * e, void * vt )
|
|||
tr_statsAddUploaded( tor->session, e->length );
|
||||
|
||||
/* update our atom */
|
||||
if( e->wasPieceData )
|
||||
if( peer->atom && e->wasPieceData )
|
||||
peer->atom->piece_data_time = now;
|
||||
|
||||
break;
|
||||
|
@ -1671,7 +1670,8 @@ peerCallbackFunc( tr_peer * peer, const tr_peer_event * e, void * vt )
|
|||
break;
|
||||
|
||||
case TR_PEER_CLIENT_GOT_PORT:
|
||||
peer->atom->port = e->port;
|
||||
if( peer->atom )
|
||||
peer->atom->port = e->port;
|
||||
break;
|
||||
|
||||
case TR_PEER_CLIENT_GOT_SUGGEST:
|
||||
|
@ -1699,7 +1699,7 @@ peerCallbackFunc( tr_peer * peer, const tr_peer_event * e, void * vt )
|
|||
tr_statsAddDownloaded( tor->session, e->length );
|
||||
|
||||
/* update our atom */
|
||||
if( e->wasPieceData )
|
||||
if( peer->atom && e->wasPieceData )
|
||||
peer->atom->piece_data_time = now;
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue