korganizer: fixed SEGFAULT when deleting recurring TODOs.

This resolves bug 2335 and 2682.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 4e2582d3eb)
r14.0.x
Michele Calgaro 6 years ago
parent fa7ffe05ea
commit f199c3d632
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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

Loading…
Cancel
Save