1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 03:12:44 +00:00

#4063 Adding a tracker before last failed add causes lockup

This commit is contained in:
Mitchell Livingston 2011-03-24 00:56:36 +00:00
parent fa9366c139
commit 1dd57609d5

View file

@ -238,6 +238,8 @@
if ([fTrackerTable editedRow] != -1)
return;
[self updateInfo];
if ([[sender cell] tagForSegment: [sender selectedSegment]] == TRACKER_REMOVE_TAG)
[self removeTrackers];
else
@ -330,7 +332,10 @@
}
}
NSAssert(removeCount > 0, @"Trying to remove no trackers.");
//we might have no trackers if remove right after a failed add (race condition ftw)
#warning look into having a failed add apply right away, so that this can become an assert
if (removeCount == 0)
return;
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"WarningRemoveTrackers"])
{