[evolution] Bug #602996 - Prevent crash on certain circumstances



commit 5853908ad62fd056a2a4d846b96939168f65e2b6
Author: Milan Crha <mcrha redhat com>
Date:   Mon Feb 22 14:43:59 2010 +0100

    Bug #602996 - Prevent crash on certain circumstances

 addressbook/gui/widgets/eab-gui-util.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 31d05d2..cc78818 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]