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.
This commit is contained in:
Georges Basile Stavracas Neto
2020-06-17 21:24:36 -03:00
parent 1bb00b8989
commit 4b6a559924
+2
View File
@@ -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,