diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-09-08 00:31:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-09-08 07:08:54 +0800 |
commit | 3da4948c0fc1f2c21b163f0ec456b2d99c881258 (patch) | |
tree | 479d6153d31e03cb7a65990683b5271402e5ec29 /plugins/publish-calendar/publish-format-ical.c | |
parent | 2e5031cb4538b4819e5fce5d717668c3445df80a (diff) | |
download | gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.gz gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.bz2 gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.lz gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.xz gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.zst gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.zip |
Miscellaneous cleanups.
Diffstat (limited to 'plugins/publish-calendar/publish-format-ical.c')
-rw-r--r-- | plugins/publish-calendar/publish-format-ical.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/publish-calendar/publish-format-ical.c b/plugins/publish-calendar/publish-format-ical.c index 95e5dd8aef..c875904495 100644 --- a/plugins/publish-calendar/publish-format-ical.c +++ b/plugins/publish-calendar/publish-format-ical.c @@ -51,8 +51,13 @@ insert_tz_comps (icalparameter *param, if (g_hash_table_lookup (tdata->zones, tzid)) return; - if (!e_cal_client_get_timezone_sync (tdata->client, tzid, &zone, NULL, &error)) { - g_warning ("Could not get the timezone information for %s : %s \n", tzid, error->message); + e_cal_client_get_timezone_sync ( + tdata->client, tzid, &zone, NULL, &error); + + if (error != NULL) { + g_warning ( + "Could not get the timezone information for %s: %s", + tzid, error->message); g_error_free (error); return; } @@ -78,7 +83,7 @@ write_calendar (const gchar *uid, ESource *source; ESourceRegistry *registry; EClient *client = NULL; - GSList *objects; + GSList *objects = NULL; icalcomponent *top_level; gboolean res = FALSE; @@ -103,7 +108,10 @@ write_calendar (const gchar *uid, top_level = e_cal_util_new_top_level (); - if (e_cal_client_get_object_list_sync (E_CAL_CLIENT (client), "#t", &objects, NULL, error)) { + e_cal_client_get_object_list_sync ( + E_CAL_CLIENT (client), "#t", &objects, NULL, error); + + if (objects != NULL) { GSList *iter; gchar *ical_string; CompTzData tdata; |