From 8236cce314ca23ae258687c7c523b08ea0a98879 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 25 May 2007 16:19:02 +0000 Subject: Don't assume the relative URI is non-NULL (#427232). 2007-05-25 Matthew Barnes * addressbook/gui/component/addressbook-component.c (ensure_sources): * addressbook/gui/component/addressbook-migrate.c (ensure_sources): * calendar/gui/migration.c (create_calendar_sources), (create_task_sources), (create_memo_sources): * calendar/gui/tasks-component.c (ensure_sources): * calendar/gui/calendar-component.c (ensure_sources): * calendar/gui/memos-component.c (ensure_sources): * plugins/hula-account-setup/camel-hula-listener.c (remove_esource), (modify_esource): * plugins/groupwise-account-setup/camel-gw-listener.c (remove_esource), (modify_esource): Don't assume the relative URI is non-NULL (#427232). * plugins/exchange-operations/exchange-config-listener.c (exchange_add_autocompletion_folders): Don't assume the absolute URI is non-NULL (#427232). svn path=/trunk/; revision=33577 --- plugins/exchange-operations/ChangeLog | 5 +++++ .../exchange-operations/exchange-config-listener.c | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'plugins/exchange-operations') diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 259dd47f88..1407b97101 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,8 @@ +2007-05-25 Matthew Barnes + + * exchange-config-listener.c (exchange_add_autocompletion_folders): + Don't assume the absolute URI is non-NULL (#427232). + 2007-05-11 Gilles Dartiguelongue * exchange-folder.c: (org_gnome_exchange_folder_inbox_unsubscribe): diff --git a/plugins/exchange-operations/exchange-config-listener.c b/plugins/exchange-operations/exchange-config-listener.c index c59b738d1d..8e6c8e5d33 100644 --- a/plugins/exchange-operations/exchange-config-listener.c +++ b/plugins/exchange-operations/exchange-config-listener.c @@ -1248,26 +1248,29 @@ static void exchange_add_autocompletion_folders (GConfClient *gc_client, ExchangeAccount *account) { ESourceList *sl=NULL; - ESourceGroup *group; ESource *source; - GSList *groups, *sources; + GSList *groups; gboolean found_group=FALSE; sl = e_source_list_new_for_gconf (gc_client, CONF_KEY_CONTACTS); groups = e_source_list_peek_groups (sl); for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) { - group = E_SOURCE_GROUP (groups->data); + ESourceGroup *group = E_SOURCE_GROUP (groups->data); + if (strcmp (e_source_group_peek_name (group), account->account_name) == 0 && strcmp (e_source_group_peek_base_uri (group), EXCHANGE_URI_PREFIX) == 0) { - - sources = e_source_group_peek_sources (group); + GSList *sources = e_source_group_peek_sources (group); for( ; sources != NULL; sources = g_slist_next (sources)) { - source = E_SOURCE (sources->data); - if (g_str_has_prefix (e_source_peek_absolute_uri (source), - "gal://")) { + ESource *source = E_SOURCE (sources->data); + const gchar *absolute_uri; + + absolute_uri = e_source_peek_absolute_uri (source); + if (absolute_uri == NULL) + continue; + if (g_str_has_prefix (absolute_uri, "gal://")) { /* Set autocompletion on GAL alone by default */ e_source_set_property (source, "completion", "true"); break; -- cgit v1.2.3