Commit d29fab48 authored by Fabian Kosmale's avatar Fabian Kosmale Committed by Fabian Kosmale

don't use invalidated iterator

parent 260f16bd
......@@ -187,12 +187,15 @@ void SyncOperation::install(QUuid uuid, QList< Akabei::Package* > packages)
continue;
mostRecent = (*it1);
for (it2 = it1 + 1; it2 != packages.end(); it2++) {
it2 = it1 + 1;
while (it2 != packages.end()) {
if ((*it1)->name() == (*it2)->name()) {
if ((*it2)->version() > (*it1)->version()) {
mostRecent = (*it2);
}
packages.erase(it2);
it2 = packages.erase(it2);
} else {
++it2;
}
}
......
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