From: Damiano Galassi Date: Wed, 15 Mar 2017 15:31:57 +0000 (+0100) Subject: MacGui: fix a possible race condition with the multiprocess queue when editing a... X-Git-Tag: 1.1.0~640 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c0c958582c3c793136f08f6635059605a31d8be;p=handbrake MacGui: fix a possible race condition with the multiprocess queue when editing a job. --- diff --git a/macosx/HBQueueController.m b/macosx/HBQueueController.m index 9219458ae..f6da396bb 100644 --- a/macosx/HBQueueController.m +++ b/macosx/HBQueueController.m @@ -1268,8 +1268,6 @@ NSParameterAssert(job); [self.jobs beginTransaction]; - NSInteger index = [self.jobs indexOfObject:job]; - if (job != self.currentJob) { job.state = HBJobStateWorking; @@ -1278,6 +1276,7 @@ if (result) { // Now that source is loaded and settings applied, delete the queue item from the queue + NSInteger index = [self.jobs indexOfObject:job]; [self removeQueueItemAtIndex:index]; } else