Changeset 4166


Ignore:
Timestamp:
Dec 13, 2007, 9:48:39 PM (14 years ago)
Author:
charles
Message:

(maybe) fix shutdown crash in "pulse" reported by pea_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tracker.c

    r4162 r4166  
    905905    const time_t now = time( NULL );
    906906
     907    if( handle->tracker == NULL )
     908        return FALSE;
     909
    907910    if( handle->tracker->socketCount || tr_list_size(th->requestQueue) || tr_list_size(th->scrapeQueue) )
    908911        dbgmsg( NULL, "tracker pulse... %d sockets, %d reqs left, %d scrapes left", handle->tracker->socketCount, tr_list_size(th->requestQueue), tr_list_size(th->scrapeQueue) );
     
    942945onReqDone( tr_handle * handle )
    943946{
    944     pulse( handle );
    945     --handle->tracker->socketCount;
    946     dbgmsg( NULL, "decrementing socket count to %d", handle->tracker->socketCount );
     947    if( handle->tracker )
     948    {
     949        pulse( handle );
     950        --handle->tracker->socketCount;
     951        dbgmsg( NULL, "decrementing socket count to %d", handle->tracker->socketCount );
     952    }
    947953}
    948954
Note: See TracChangeset for help on using the changeset viewer.