From 96e5b24aa20285d6ddfb23a5be73100056b468c6 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 12 Jul 2009 11:52:58 +0000 Subject: [PATCH] a little more checking when removing trackers --- macosx/InfoWindowController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index ec600b777..16f43906b 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -1701,7 +1701,7 @@ typedef enum [[self window] makeKeyWindow]; NSUInteger index = 1; - if ([[fTorrents objectAtIndex: 0] hasAddedTrackers]) + if ([fTrackers size] > 0 && [[fTorrents objectAtIndex: 0] hasAddedTrackers]) { for (; index < [fTrackers count]; index++) if ([[fTrackers objectAtIndex: index] isKindOfClass: [NSNumber class]]) @@ -1724,7 +1724,7 @@ typedef enum NSUInteger i = 0, numberBuiltIn = 0; while (i < [fTrackers count]) { - BOOL builtIn = i != 0 || [[fTrackers objectAtIndex: i] intValue] != 0; + const BOOL builtIn = i != 0 || [[fTrackers objectAtIndex: i] intValue] != 0; //if a group is selected, remove all trackers in the group if ([indexes containsIndex: i])