1
0
Fork 0
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:
Charles Kerr 2007-10-13 14:07:08 +00:00
parent 3e878aeba9
commit 004ade57f0

View file

@ -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 )