Fix crash by replacing unsafe reverse iterator loop in EventLogList (cherry pick 23875ce1)

This commit is contained in:
Gaelle Braud 2025-11-14 10:12:00 +01:00
parent a0850b9967
commit a4b38e4fd1

View file

@ -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);
}
} }
}); });
}); });