Fix crash by replacing unsafe reverse iterator loop in EventLogList (cherry pick 23875ce1)
This commit is contained in:
parent
a0850b9967
commit
a4b38e4fd1
1 changed files with 6 additions and 3 deletions
|
|
@ -156,9 +156,12 @@ void EventLogList::displayMore() {
|
||||||
}
|
}
|
||||||
mCoreModelConnection->invokeToCore([this, events] {
|
mCoreModelConnection->invokeToCore([this, events] {
|
||||||
int currentCount = mList.count();
|
int currentCount = mList.count();
|
||||||
for (auto it = events->end() - 1; it >= events->begin(); --it) {
|
if (!events->isEmpty()) {
|
||||||
connectItem(*it);
|
for (int i = events->size() - 1; i >= 0; --i) {
|
||||||
prepend(*it);
|
const auto &ev = events->at(i);
|
||||||
|
connectItem(ev);
|
||||||
|
prepend(ev);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue