Fix crash on clip job.

Fixes #637
parent 7313d42b
......@@ -47,8 +47,8 @@ int JobManager::startJob(const std::vector<QString> &binIds, int parentId, QStri
m_jobs[jobId] = job;
endInsertRows();
m_lock.unlock();
if (parentId == -1 || m_jobs[parentId]->m_completionMutex.tryLock()) {
if (parentId != -1) {
if (parentId == -1 || m_jobs.count(parentId) == 0 || m_jobs[parentId]->m_completionMutex.tryLock()) {
if (parentId != -1 && m_jobs.count(parentId) > 0) {
m_jobs[parentId]->m_completionMutex.unlock();
}
QtConcurrent::run(this, &JobManager::createJob, job);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment