(trunk gtk) #3421 "crash when opening properties dialog on a magnet link w/o metainfo" -- fixed

This commit is contained in:
Charles Kerr 2010-07-13 03:02:22 +00:00
parent 730283b8f7
commit 1ab45eb639
1 changed files with 2 additions and 1 deletions

View File

@ -787,9 +787,10 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n )
uint32_t verifiedPieces = 0;
for( i=0; i<n; ++i ) {
const tr_stat * st = stats[i];
const tr_info * inf = infos[i];
haveUnchecked += st->haveUnchecked;
haveValid += st->haveValid;
verifiedPieces += st->haveValid / tr_torrentInfo(torrents[i])->pieceSize;
verifiedPieces += inf->pieceSize ? st->haveValid / inf->pieceSize : 0;
sizeWhenDone += st->sizeWhenDone;
leftUntilDone += st->leftUntilDone;
available += st->sizeWhenDone - st->leftUntilDone + st->desiredAvailable;