This hopefully fixes a double delete bug. I don't see what would prevent both

RunnerManager::jobDone() and DelayedJobCleaner::jobDone() from being invoked
if the JobDone() signal is emitted just at the right (wrong) time.
Both jobDone() slots delete (as in delete operator) the job.
CCMAIL:aseigo@kde.org

svn path=/trunk/KDE/kdelibs/; revision=1033035
This commit is contained in:
Andreas Hartmetz 2009-10-09 09:33:20 +00:00
parent 633d51612c
commit d0ecf4ae88
2 changed files with 3 additions and 3 deletions

View File

@ -190,7 +190,7 @@ void DelayedJobCleaner::jobDone(ThreadWeaver::Job *job)
}
m_jobs.remove(runJob);
delete runJob;
runJob->deleteLater();
if (m_jobs.isEmpty()) {
deleteLater();

View File

@ -197,7 +197,7 @@ public:
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