[gnome-calendar] manager: Assert that cloning was successful



commit 4b6a5599241cc8ea004d47b5d9cfa2fa20d2d7a2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Jun 17 21:00:19 2020 -0300

    manager: Assert that cloning was successful
    
    Cloning an ECalComponent can fail, and we need to be able to
    catch these failures.
    
    Assert that cloning was successful before procceeding with
    the move.

 src/core/gcal-manager.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/core/gcal-manager.c b/src/core/gcal-manager.c
index 3eee92d8..626cbf77 100644
--- a/src/core/gcal-manager.c
+++ b/src/core/gcal-manager.c
@@ -1099,6 +1099,8 @@ gcal_manager_move_event_to_source (GcalManager *self,
   clone = e_cal_component_clone (ecomponent);
   comp = e_cal_component_get_icalcomponent (clone);
 
+  g_assert (clone != NULL);
+
   e_cal_client_create_object_sync (gcal_calendar_get_client (calendar),
                                    comp,
                                    E_CAL_OPERATION_FLAG_NONE,


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