Changeset 11491


Ignore:
Timestamp:
Dec 8, 2010, 3:45:43 PM (11 years ago)
Author:
charles
Message:

(trunk qt) #3814 "Crash when opening properties dialog on a torrent before all its stats have been fetched" -- fixed.

Location:
trunk/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/details.cc

    r11452 r11491  
    367367                const uint64_t v = t->haveVerified( );
    368368                haveVerified += v;
    369                 verifiedPieces += v / t->pieceSize( );
     369                if( t->pieceSize( ) )
     370                    verifiedPieces += v / t->pieceSize( );
    370371                sizeWhenDone += t->sizeWhenDone( );
    371372                leftUntilDone += t->leftUntilDone( );
  • trunk/qt/torrent.cc

    r11446 r11491  
    538538    if( tr_bencDictFindList( d, "fileStats", &files ) ) {
    539539        const int n = tr_bencListSize( files );
    540         assert( n == myFiles.size( ) );
    541         for( int i=0; i<n; ++i ) {
     540        for( int i=0; i<n && i<myFiles.size(); ++i ) {
    542541            int64_t intVal;
    543542            tr_bool boolVal;
Note: See TracChangeset for help on using the changeset viewer.