From 004ade57f0d7f9a6622be547104847e2a85f9646 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 13 Oct 2007 14:07:08 +0000 Subject: [PATCH] fix crash-on-adding-new-torrents introduced in r3387 --- libtransmission/fastresume.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libtransmission/fastresume.c b/libtransmission/fastresume.c index 89deaa1a5..9dd5a950a 100644 --- a/libtransmission/fastresume.c +++ b/libtransmission/fastresume.c @@ -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 )