From 4b6a5599241cc8ea004d47b5d9cfa2fa20d2d7a2 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Wed, 17 Jun 2020 21:00:19 -0300 Subject: [PATCH] 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,