diff --git a/private/runnerjobs.cpp b/private/runnerjobs.cpp index deb4c48dc..07862ca56 100644 --- a/private/runnerjobs.cpp +++ b/private/runnerjobs.cpp @@ -190,7 +190,7 @@ void DelayedJobCleaner::jobDone(ThreadWeaver::Job *job) } m_jobs.remove(runJob); - delete runJob; + runJob->deleteLater(); if (m_jobs.isEmpty()) { deleteLater(); diff --git a/runnermanager.cpp b/runnermanager.cpp index fd564d03d..a5a800608 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -191,13 +191,13 @@ public: if (deferredRun.isEnabled() && runJob->runner() == deferredRun.runner()) { //kDebug() << "job actually done, running now **************"; QueryMatch tmpRun = deferredRun; - deferredRun = QueryMatch(0); + deferredRun = QueryMatch(0); tmpRun.run(context); } searchJobs.remove(runJob); oldSearchJobs.remove(runJob); - delete runJob; + runJob->deleteLater(); if (searchJobs.isEmpty() && context.matches().isEmpty()) { // we finished our run, and there are no valid matches, and so no