From fa2bc23cda1d194a740828aacef932379aca1df6 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Thu, 14 Aug 2008 21:47:23 +0000 Subject: [PATCH] remove potentially invalid tracker url's in the creator window --- macosx/CreatorWindowController.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/macosx/CreatorWindowController.m b/macosx/CreatorWindowController.m index b05485352..54badb2c1 100644 --- a/macosx/CreatorWindowController.m +++ b/macosx/CreatorWindowController.m @@ -111,7 +111,7 @@ { fTrackers = [[NSMutableArray alloc] initWithCapacity: 1]; - //check for tracker from versions before 1.3 + //check for single tracker from versions before 1.3 NSString * tracker; if ((tracker = [fDefaults stringForKey: @"CreatorTracker"])) { @@ -120,6 +120,14 @@ [fDefaults setObject: fTrackers forKey: @"CreatorTrackers"]; } } + + //remove potentially invalid addresses + NSInteger i; + for (i = [fTrackers count]-1; i >= 0; i--) + { + if (!tr_httpIsValidURL([[fTrackers objectAtIndex: i] UTF8String])) + [fTrackers removeObjectAtIndex: i]; + } } return self; }