From 4e2582d3ebe797a3054e33c6c5d7000395642f42 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 10 Nov 2018 23:38:10 +0900 Subject: korganizer: fixed SEGFAULT when deleting recurring TODOs. This resolves bug 2335 and 2682. Signed-off-by: Michele Calgaro --- libkcal/calendar.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index 5918a749..f7988077 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -479,8 +479,10 @@ bool Calendar::deleteIncidence( Incidence *incidence ) IncidenceList il = incidence->childIncidences(); IncidenceListIterator it; it = il.begin(); - parentIncidence = this->incidence(*it); - parentIncidence->deleteChildIncidence(incidence->uid()); + if (it != il.end()) { + parentIncidence = this->incidence(*it); + parentIncidence->deleteChildIncidence(incidence->uid()); + } } else { // Delete all children as well -- cgit v1.2.3