From 5d40c589ac1f330e06d6384ebd150f24f15c04a9 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 25 Mar 2003 13:57:25 +0000 Subject: Utility wrapper around icalparser. * cal-util/cal-util.c (cal_util_parse_ics_file): Utility wrapper around icalparser. * cal-util/test-recur.c (main): Use it * pcs/cal-backend-file.c (open_cal): Likewise * gui/comp-editor-factory.c (open_client): Add the OpenClient to the hash before calling cal_client_open_calendar, since in some failure cases, that will call cal_opened_cb (which will free the oc) with a failure immediately, causing a crash if we then try to deref it. svn path=/trunk/; revision=20492 --- calendar/gui/comp-editor-factory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c index 404b0ab5a6..6c40a0d644 100644 --- a/calendar/gui/comp-editor-factory.c +++ b/calendar/gui/comp-editor-factory.c @@ -514,6 +514,8 @@ open_client (CompEditorFactory *factory, const char *uristr) g_signal_connect (oc->client, "cal_opened", G_CALLBACK (cal_opened_cb), oc); + g_hash_table_insert (priv->uri_client_hash, oc->uri, oc); + if (!cal_client_open_calendar (oc->client, uristr, FALSE)) { g_free (oc->uri); g_object_unref (oc->client); @@ -522,8 +524,6 @@ open_client (CompEditorFactory *factory, const char *uristr) return NULL; } - g_hash_table_insert (priv->uri_client_hash, oc->uri, oc); - return oc; } -- cgit v1.2.3