[evolution-kolab] ECalBackendKolab: avoid possible segfault when removing objects
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] ECalBackendKolab: avoid possible segfault when removing objects
- Date: Wed, 29 Aug 2012 15:53:12 +0000 (UTC)
commit 647a46c29abb57e96393471f91366e4e7434b51e
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Wed Aug 29 17:53:01 2012 +0200
ECalBackendKolab: avoid possible segfault when removing objects
src/calendar/e-cal-backend-kolab.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index 57874a6..b829781 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -1228,6 +1228,8 @@ cal_backend_kolab_remove_objects (ECalBackendSync *backend,
ECalComponent *oldcomp = NULL;
ECalComponent *newcomp = NULL;
ECalComponent *oldtz = NULL;
+ ECalComponent *oc_data = NULL;
+ ECalComponent *nc_data = NULL;
ECalComponentId *id = NULL;
const gchar *uid, *rid;
KolabSettingsHandler *ksettings = NULL;
@@ -1381,10 +1383,15 @@ cal_backend_kolab_remove_objects (ECalBackendSync *backend,
}
}
+ if (*old_components != NULL)
+ oc_data = (*old_components)->data;
+ if (*new_components = NULL)
+ nc_data = (*new_components)->data;
+
e_cal_backend_notify_component_removed (E_CAL_BACKEND (backend),
id,
- (*old_components)->data,
- (*new_components)->data);
+ oc_data,
+ nc_data);
e_cal_component_free_id (id);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]