korganizer: fixed SEGFAULT when deleting recurring TODOs.

This resolves bug 2335 and 2682.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/8/head
Michele Calgaro 6 years ago
parent dfa201d00d
commit 4e2582d3eb
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