diff options
author | Milan Crha <mcrha@redhat.com> | 2011-06-30 05:08:37 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-06-30 05:08:37 +0800 |
commit | 87c04cfc2ccd7ffea028ee4e1d7a7e5d554ca056 (patch) | |
tree | eeb8a4dc20cccdda68aeb5fff0274e44511bde8f /modules/calendar/e-memo-shell-backend.c | |
parent | a6c6699511d9fdf96bb36e5ff4cf7c91c0ca07f7 (diff) | |
download | gsoc2013-evolution-87c04cfc2ccd7ffea028ee4e1d7a7e5d554ca056.tar.gz gsoc2013-evolution-87c04cfc2ccd7ffea028ee4e1d7a7e5d554ca056.tar.zst gsoc2013-evolution-87c04cfc2ccd7ffea028ee4e1d7a7e5d554ca056.zip |
Add a bit more error checking and do not leak icalcomponent-s
Diffstat (limited to 'modules/calendar/e-memo-shell-backend.c')
-rw-r--r-- | modules/calendar/e-memo-shell-backend.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c index 8d39843054..2be78895f6 100644 --- a/modules/calendar/e-memo-shell-backend.c +++ b/modules/calendar/e-memo-shell-backend.c @@ -419,7 +419,11 @@ memo_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; + } if (e_cal_component_has_organizer (comp)) flags |= COMP_EDITOR_IS_SHARED; |