mirror of
https://github.com/transmission/transmission
synced 2025-02-05 05:53:59 +00:00
fix crash-on-adding-new-torrents introduced in r3387
This commit is contained in:
parent
3e878aeba9
commit
004ade57f0
1 changed files with 3 additions and 2 deletions
|
@ -526,6 +526,9 @@ fastResumeLoadImpl ( tr_torrent * tor,
|
|||
assert( tor != NULL );
|
||||
assert( uncheckedPieces != NULL );
|
||||
|
||||
/* initialize the fallback values */
|
||||
tor->destination = tr_strdup( fallbackDestination );
|
||||
|
||||
/* Open resume file */
|
||||
fastResumeFileName( path, sizeof path, tor, 1 );
|
||||
file = fopen( path, "rb" );
|
||||
|
@ -546,8 +549,6 @@ fastResumeLoadImpl ( tr_torrent * tor,
|
|||
|
||||
tr_dbg( "Resume file '%s' loaded", path );
|
||||
|
||||
tor->destination = tr_strdup( fallbackDestination );
|
||||
|
||||
/* Check format version */
|
||||
fread( &version, 4, 1, file );
|
||||
if( 0 == version )
|
||||
|
|
Loading…
Reference in a new issue