aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-task-shell-backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar/e-task-shell-backend.c')
-rw-r--r--modules/calendar/e-task-shell-backend.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index 768f46fd28..ebee92479b 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -419,10 +419,14 @@ task_shell_backend_handle_uri_cb (EShellBackend *shell_backend,
}
comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomp);
+ if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
+ g_debug ("%s: Failed to set icalcomp to comp\n", G_STRFUNC);
+ icalcomponent_free (icalcomp);
+ icalcomp = NULL;
+ }
- icalprop = icalcomponent_get_first_property (
- icalcomp, ICAL_ATTENDEE_PROPERTY);
+ icalprop = icalcomp ? icalcomponent_get_first_property (
+ icalcomp, ICAL_ATTENDEE_PROPERTY) : NULL;
if (icalprop != NULL)
flags |= COMP_EDITOR_IS_ASSIGNED;