From 9c0c958582c3c793136f08f6635059605a31d8be Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Wed, 15 Mar 2017 16:31:57 +0100 Subject: MacGui: fix a possible race condition with the multiprocess queue when editing a job. --- macosx/HBQueueController.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'macosx/HBQueueController.m') 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 -- cgit v1.2.3