fix crash when marking many articles as read/unread

This commit is contained in:
Martin Rotter 2023-12-06 13:42:31 +01:00
parent a9b0b1ef95
commit c29c5ff4eb

View file

@ -1028,8 +1028,11 @@ bool ServiceRoot::onAfterSetMessagesRead(RootItem* selected_item,
for (const QString& lbl : lbls) {
Label* l = labelsNode()->labelById(lbl);
l->updateCounts(false);
to_update << l;
if (l != nullptr) {
l->updateCounts(false);
to_update << l;
}
}
}