package kit: JobQueue::Pop() fix invalid iterator access

This commit is contained in:
Ingo Weinhold 2013-08-25 17:02:05 +02:00
parent f5821a1aee
commit ab9a117918

View File

@ -159,8 +159,9 @@ JobQueue::Pop()
if (head == fQueuedJobs->end()) if (head == fQueuedJobs->end())
return NULL; return NULL;
} }
BJob* job = *head;
fQueuedJobs->erase(head); fQueuedJobs->erase(head);
return *head; return job;
} }
return NULL; return NULL;