fix John_Clay's ptrarray.c:201 crash. (maybe.)

This commit is contained in:
Charles Kerr 2007-10-07 04:14:34 +00:00
parent d9e3272306
commit 2381279da6
1 changed files with 4 additions and 2 deletions

View File

@ -551,8 +551,10 @@ static int
onTorrentScrapeNow( void * vtor )
{
Torrent * tor = (Torrent *) vtor;
if( trackerSupportsScrape( tor->tracker ) ) {
tr_ptrArrayInsertSorted( tor->tracker->scrapeQueue, tor, torrentCompare );
if( trackerSupportsScrape( tor->tracker ) )
{
if( tr_ptrArrayFindSorted( tor->tracker->scrapeQueue, tor, torrentCompare) == NULL )
tr_ptrArrayInsertSorted( tor->tracker->scrapeQueue, tor, torrentCompare );
tr_trackerScrapeSoon( tor->tracker );
}
tor->scrapeTimer = NULL;