diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-11-10 23:38:10 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-11-10 23:38:10 +0900 |
commit | 4e2582d3ebe797a3054e33c6c5d7000395642f42 (patch) | |
tree | 28ee5db5dc0f777970ff639c4c437ce0a09a3e95 | |
parent | dfa201d00dc5ead8135aae9e42bdfb0a54c18cc1 (diff) | |
download | tdepim-4e2582d3ebe797a3054e33c6c5d7000395642f42.tar.gz tdepim-4e2582d3ebe797a3054e33c6c5d7000395642f42.zip |
korganizer: fixed SEGFAULT when deleting recurring TODOs.
This resolves bug 2335 and 2682.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-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 |