Ignore:
Timestamp:
Jan 22, 2011, 1:21:20 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) #3932 "Assertion failed: (tab != NULL), function tr_torrentAvailability"

Looks like tab can be NULL from the Mac client when magnet links are involved and the Mac client doesn't know how many pieces are available, so that assertion's not appropriate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r11709 r11746  
    14561456tr_torrentAvailability( const tr_torrent * tor, int8_t * tab, int size )
    14571457{
    1458     assert( tr_isTorrent( tor ) );
    1459     assert( tab != NULL );
    1460     assert( size > 0 );
    1461 
    1462     tr_torrentLock( tor );
    1463 
    1464     tr_peerMgrTorrentAvailability( tor, tab, size );
    1465 
    1466     tr_torrentUnlock( tor );
     1458    if( tr_isTorrent( tor ) && ( tab != NULL ) && ( size > 0 ) )
     1459    {
     1460        tr_torrentLock( tor );
     1461        tr_peerMgrTorrentAvailability( tor, tab, size );
     1462        tr_torrentUnlock( tor );
     1463    }
    14671464}
    14681465
Note: See TracChangeset for help on using the changeset viewer.