[evolution-data-server/gnome-3-8] e_cal_backend_notify_component_modified: 'old_component' can be NULL



commit c681c6446c1b2d067dfd501422e425079df37814
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jul 22 15:20:28 2013 +0200

    e_cal_backend_notify_component_modified: 'old_component' can be NULL
    
    The 'old_component' parameter can be NULL, but the function expects it
    always an a valid ECalComponent object, which made notifications about
    changes missing for such cases (like detaching a recurring event instance).

 calendar/libedata-cal/e-cal-backend.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/calendar/libedata-cal/e-cal-backend.c b/calendar/libedata-cal/e-cal-backend.c
index 4218b45..5540e2d 100644
--- a/calendar/libedata-cal/e-cal-backend.c
+++ b/calendar/libedata-cal/e-cal-backend.c
@@ -1803,7 +1803,8 @@ e_cal_backend_notify_component_modified (ECalBackend *backend,
        GList *list, *link;
 
        g_return_if_fail (E_IS_CAL_BACKEND (backend));
-       g_return_if_fail (E_IS_CAL_COMPONENT (old_component));
+       if (old_component)
+               g_return_if_fail (E_IS_CAL_COMPONENT (old_component));
        g_return_if_fail (E_IS_CAL_COMPONENT (new_component));
 
        if (backend->priv->notification_proxy != NULL) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]