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:
parent
fa9366c139
commit
1dd57609d5
1 changed files with 6 additions and 1 deletions
|
@ -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"])
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue