mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
a little more checking when removing trackers
This commit is contained in:
parent
810e2f6727
commit
96e5b24aa2
1 changed files with 2 additions and 2 deletions
|
@ -1701,7 +1701,7 @@ typedef enum
|
||||||
[[self window] makeKeyWindow];
|
[[self window] makeKeyWindow];
|
||||||
|
|
||||||
NSUInteger index = 1;
|
NSUInteger index = 1;
|
||||||
if ([[fTorrents objectAtIndex: 0] hasAddedTrackers])
|
if ([fTrackers size] > 0 && [[fTorrents objectAtIndex: 0] hasAddedTrackers])
|
||||||
{
|
{
|
||||||
for (; index < [fTrackers count]; index++)
|
for (; index < [fTrackers count]; index++)
|
||||||
if ([[fTrackers objectAtIndex: index] isKindOfClass: [NSNumber class]])
|
if ([[fTrackers objectAtIndex: index] isKindOfClass: [NSNumber class]])
|
||||||
|
@ -1724,7 +1724,7 @@ typedef enum
|
||||||
NSUInteger i = 0, numberBuiltIn = 0;
|
NSUInteger i = 0, numberBuiltIn = 0;
|
||||||
while (i < [fTrackers count])
|
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 a group is selected, remove all trackers in the group
|
||||||
if ([indexes containsIndex: i])
|
if ([indexes containsIndex: i])
|
||||||
|
|
Loading…
Reference in a new issue