diff options
-rw-r--r-- | libkcal/calendar.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index 5918a749b..f7988077a 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 |