From 5853908ad62fd056a2a4d846b96939168f65e2b6 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 22 Feb 2010 14:43:59 +0100 Subject: Bug #602996 - Prevent crash on certain circumstances --- addressbook/gui/widgets/eab-gui-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 31d05d278c..cc78818f6f 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -110,7 +110,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) "to download its contents."); } - else if (!strncmp (uri, "file:", 5)) { + else if (uri && !strncmp (uri, "file:", 5)) { gchar *path = g_filename_from_uri (uri, NULL, NULL); label = g_strdup_printf ( _("This address book cannot be opened. Please check that the " @@ -120,7 +120,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) } #ifndef HAVE_LDAP - else if (!strncmp (uri, "ldap:", 5)) { + else if (uri && !strncmp (uri, "ldap:", 5)) { /* special case for ldap: contact folders so we can tell the user about openldap */ can_detail_error = FALSE; -- cgit v1.2.3