From 6b93ed2f65445dca1ebcd1dc6d41b701aa3f1595 Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Mon, 27 Feb 2006 09:11:33 +0000 Subject: NULL check for accounts. Fixes #332185. svn path=/trunk/; revision=31590 --- plugins/exchange-operations/ChangeLog | 8 ++++++++ plugins/exchange-operations/exchange-calendar.c | 5 ++++- plugins/exchange-operations/exchange-contacts.c | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 524f9be733..7ebe8ec037 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,11 @@ +2006-02-27 Sushma Rai + + * exchange-contacts.c (e_exchange_contacts_pcontacts): Check for NULL + account. + + * exchange-calendar.c (e_exchange_calendar_pcalendar): Similar. + Fixes #332185. + 2006-02-27 Sushma Rai * exchange-folder-permission.c diff --git a/plugins/exchange-operations/exchange-calendar.c b/plugins/exchange-operations/exchange-calendar.c index e316dc2421..c6291cfb5a 100644 --- a/plugins/exchange-operations/exchange-calendar.c +++ b/plugins/exchange-operations/exchange-calendar.c @@ -159,7 +159,6 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data) char *offline_msg; GtkWidget *lbl_offline_msg; - if (!hidden) hidden = gtk_label_new (""); @@ -212,6 +211,10 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data) /* REVIEW: Should this handle be freed? - Attn: surf */ account = exchange_operations_get_exchange_account (); + if (!account) { + g_free (calendar_old_source_uri); + retrun NULL; + } account_name = account->account_name; if (calendar_src_exists) { diff --git a/plugins/exchange-operations/exchange-contacts.c b/plugins/exchange-operations/exchange-contacts.c index 67c1d07476..506522038d 100644 --- a/plugins/exchange-operations/exchange-contacts.c +++ b/plugins/exchange-operations/exchange-contacts.c @@ -192,6 +192,10 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data) } account = exchange_operations_get_exchange_account (); + if (!account) { + g_free (contacts_old_src_uri); + return NULL; + } account_name = account->account_name; hbx_size = NULL; -- cgit v1.2.3