Commit 939d98bf authored by Carl Schwan's avatar Carl Schwan 🚴
Browse files

Handle empty incidence

Log them instead of crashin

BUG: 453395



Signed-off-by: Carl Schwan's avatarCarl Schwan <carl@carlschwan.eu>
parent e89f31c4
Pipeline #184183 passed with stage
in 5 minutes and 22 seconds
......@@ -242,8 +242,12 @@ void KalendarAlarmClient::checkAlarms()
for (const Alarm::Ptr &alarm : alarms) {
const QString uid = alarm->parentUid();
const auto incidence = mCalendar->incidence(uid);
const auto occurrence = occurrenceForAlarm(incidence, alarm, from);
addNotification(uid, alarm->text(), occurrence, mLastChecked);
if (incidence) {
const auto occurrence = occurrenceForAlarm(incidence, alarm, from);
addNotification(uid, alarm->text(), occurrence, mLastChecked);
} else {
qCDebug(Log) << "Alarm points" << alarm << "to an nonexisting incidence" << uid;
}
}
// execute or update active alarms
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment