Skip to content

Commit 5e831bc

Browse files
nilsdingmgallien
authored andcommitted
fix(usermodel): create a copy of the original notification errors list
`ActivityListModel::removeActivityFromActivityList` mutates the reference to the list returned by `ActivityListModel::errorsList` which may result in undefined behaviour during each iteration... Signed-off-by: Jyrki Gadinger <[email protected]>
1 parent efbba73 commit 5e831bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gui/tray/usermodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ void User::slotProgressInfo(const QString &folder, const ProgressInfo &progress)
588588
return;
589589
const auto &engine = f->syncEngine();
590590
const auto style = engine.lastLocalDiscoveryStyle();
591-
for (const auto &activity : _activityModel->errorsList()) {
591+
for (const auto errorsList = _activityModel->errorsList(); const auto &activity : errorsList) {
592592
if (activity._expireAtMsecs != -1) {
593593
// we process expired activities in a different slot
594594
continue;

0 commit comments

Comments
 (0)