Skip to content
Snippets Groups Projects
Commit fa57f929 authored by Méven Car's avatar Méven Car
Browse files

kastatsfavoritesmodel: Fix a crash

Regression of b5ce9cb4

(cherry picked from commit e01b885a)
parent b085aa81
No related branches found
No related tags found
1 merge request!4536kastatsfavoritesmodel: Fix a crash
Pipeline #736003 passed with stage
in 18 minutes and 47 seconds
......@@ -193,9 +193,11 @@ public:
// https://crash-reports.kde.org/organizations/kde/issues/23450/
const auto itemEntries = m_itemEntries;
for (auto it = itemEntries.cbegin(); it != itemEntries.cend(); it = std::next(it)) {
it.value()->reload();
if (it.value() && !it.value()->isValid()) {
keys << it.key();
if (it.value()) {
it.value()->reload();
if (!it.value()->isValid()) {
keys << it.key();
}
}
}
if (!keys.isEmpty()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment