From 3472851f80136479c07bf396dbc67d888dbdac03 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 17 Aug 2008 22:50:02 +0000 Subject: [PATCH] when checking the previous tracker address for the torrent creator, don't use a blank address --- NEWS | 1 + macosx/CreatorWindowController.m | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 72599390f..fbf9e736b 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ http://trac.transmissionbt.com/query?group=component&milestone=1.33 + Fix small memory leaks - Mac + Rephrase "data not fully available" to "remaining time unknown" + + Fix bug where torrent file creation would fail because an extra blank tracker addresses was inserted - Daemon + Fix crash when adding nonexistent torrents via transmission-remote - GTK+ diff --git a/macosx/CreatorWindowController.m b/macosx/CreatorWindowController.m index 54badb2c1..be07718d0 100644 --- a/macosx/CreatorWindowController.m +++ b/macosx/CreatorWindowController.m @@ -115,9 +115,12 @@ NSString * tracker; if ((tracker = [fDefaults stringForKey: @"CreatorTracker"])) { - [fTrackers addObject: tracker]; [fDefaults removeObjectForKey: @"CreatorTracker"]; - [fDefaults setObject: fTrackers forKey: @"CreatorTrackers"]; + if (![tracker isEqualToString: @""]) + { + [fTrackers addObject: tracker]; + [fDefaults setObject: fTrackers forKey: @"CreatorTrackers"]; + } } }