Summary: | Crash when removing all jobs | ||
---|---|---|---|
Product: | [Applications] kaudiocreator | Reporter: | Markus Brueffer <markus> |
Component: | general | Assignee: | Gerd Fleischer <gerdfleischer> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | FreeBSD | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Markus Brueffer
2006-01-06 00:14:58 UTC
SVN commit 701441 by larkang: Backport: Fix crash when removing jobs, don't use the iterator after the item is removed (doesn't crash for me with 3.5, but I think it's the cause of bug #119600, at least valgrind shows an Invalid Read) BUG: 119600 M +1 -1 ripper.cpp --- branches/KDE/3.5/kdemultimedia/kaudiocreator/ripper.cpp #701440:701441 @@ -92,7 +92,6 @@ QMap<KIO::Job*, Job*>::Iterator it; for( it = jobs.begin(); it != jobs.end(); ++it ){ if(it.data()->id == id){ - jobs.remove(it.key()); KIO::FileCopyJob *copyJob = dynamic_cast<KIO::FileCopyJob*> (it.key()); if(copyJob){ QString fileDestination = (copyJob->destURL()).path(); @@ -107,6 +106,7 @@ f.remove(); } } + jobs.remove(it.key()); break; } } |