1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +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:
Jordan Lee 2011-03-03 17:28:04 +00:00
parent f9c6deab6f
commit 6d94a33f2d

View file

@ -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,6 +1670,7 @@ peerCallbackFunc( tr_peer * peer, const tr_peer_event * e, void * vt )
break;
case TR_PEER_CLIENT_GOT_PORT:
if( peer->atom )
peer->atom->port = e->port;
break;
@ -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;