mirror of
https://github.com/transmission/transmission
synced 2025-03-03 10:15:45 +00:00
(trunk qt) #3814 "Crash when opening properties dialog on a torrent before all its stats have been fetched" -- fixed.
This commit is contained in:
parent
a16fb94756
commit
ec0a4dd269
2 changed files with 3 additions and 3 deletions
|
@ -366,7 +366,8 @@ Details :: refresh( )
|
|||
haveUnverified += t->haveUnverified( );
|
||||
const uint64_t v = t->haveVerified( );
|
||||
haveVerified += v;
|
||||
verifiedPieces += v / t->pieceSize( );
|
||||
if( t->pieceSize( ) )
|
||||
verifiedPieces += v / t->pieceSize( );
|
||||
sizeWhenDone += t->sizeWhenDone( );
|
||||
leftUntilDone += t->leftUntilDone( );
|
||||
available += t->sizeWhenDone() - t->leftUntilDone() + t->desiredAvailable();
|
||||
|
|
|
@ -537,8 +537,7 @@ Torrent :: update( tr_benc * d )
|
|||
|
||||
if( tr_bencDictFindList( d, "fileStats", &files ) ) {
|
||||
const int n = tr_bencListSize( files );
|
||||
assert( n == myFiles.size( ) );
|
||||
for( int i=0; i<n; ++i ) {
|
||||
for( int i=0; i<n && i<myFiles.size(); ++i ) {
|
||||
int64_t intVal;
|
||||
tr_bool boolVal;
|
||||
tr_benc * child = tr_bencListChild( files, i );
|
||||
|
|
Loading…
Reference in a new issue