summaryrefslogtreecommitdiffstats
path: root/libkcal
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-11-10 23:38:10 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-11-10 23:38:10 +0900
commit4e2582d3ebe797a3054e33c6c5d7000395642f42 (patch)
tree28ee5db5dc0f777970ff639c4c437ce0a09a3e95 /libkcal
parentdfa201d00dc5ead8135aae9e42bdfb0a54c18cc1 (diff)
downloadtdepim-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>
Diffstat (limited to 'libkcal')
-rw-r--r--libkcal/calendar.cpp6
1 files 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