From aab9b5cce1eece7cfc7c17057f3fa632982fa44e Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 8 Aug 2002 17:14:02 +0000 Subject: Initialize loaded_backends before using it. (Just kills off a harmless * pcs/query-backend.c (query_backend_new): Initialize loaded_backends before using it. (Just kills off a harmless g_warning.) svn path=/trunk/; revision=17745 --- calendar/ChangeLog | 21 ++++++++++++++------- calendar/pcs/query-backend.c | 5 +++-- 2 files changed, 17 insertions(+), 9 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 9f055c498b..c4eee418e6 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,17 +1,24 @@ +2002-08-08 Dan Winship + + * pcs/query-backend.c (query_backend_new): Initialize + loaded_backends before using it. (Just kills off a harmless + g_warning.) + 2002-08-08 Rodrigo Moya Fixes #15710 - * cal-util/cal-component.[ch] (cal_component_alarm_get_icalcomponent): - new function for getting the icalcomponent from a CalComponentAlarm. + * cal-util/cal-component.[ch] + (cal_component_alarm_get_icalcomponent): new function for getting + the icalcomponent from a CalComponentAlarm. * gui/comp-util.c (cal_comp_event_new_with_defaults): added - X-EVOLUTION-NEEDS-DESCRIPTION property to the default reminder alarm, - so that we can identify it when saving the component. + X-EVOLUTION-NEEDS-DESCRIPTION property to the default reminder + alarm, so that we can identify it when saving the component. - * gui/dialogs/alarm-page.c (alarm_page_fill_component): if the alarm - has the X-EVOLUTION-NEEDS-DESCRIPTION property, set the description to - be the same as of the component. + * gui/dialogs/alarm-page.c (alarm_page_fill_component): if the + alarm has the X-EVOLUTION-NEEDS-DESCRIPTION property, set the + description to be the same as of the component. 2002-08-07 JP Rosevear diff --git a/calendar/pcs/query-backend.c b/calendar/pcs/query-backend.c index 651138fa03..3757a14076 100644 --- a/calendar/pcs/query-backend.c +++ b/calendar/pcs/query-backend.c @@ -260,6 +260,9 @@ query_backend_new (Query *query, CalBackend *backend) g_return_val_if_fail (IS_QUERY (query), NULL); g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); + if (!loaded_backends) + loaded_backends = g_hash_table_new (g_str_hash, g_str_equal); + /* see if we already have the backend loaded */ qb = g_hash_table_lookup (loaded_backends, cal_backend_get_uri (backend)); @@ -283,8 +286,6 @@ query_backend_new (Query *query, CalBackend *backend) gtk_signal_connect (GTK_OBJECT (backend), "obj_removed", GTK_SIGNAL_FUNC (object_removed_cb), qb); - if (!loaded_backends) - loaded_backends = g_hash_table_new (g_str_hash, g_str_equal); g_hash_table_insert (loaded_backends, qb->priv->uri, qb); } -- cgit