[gnome-calendar/gnome-3-36] manager: Assert that cloning was successful
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/gnome-3-36] manager: Assert that cloning was successful
- Date: Thu, 18 Jun 2020 00:38:14 +0000 (UTC)
commit f09b0f234070e524646223fdafacb91cbc2f0447
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]