[evolution-patches] fix for addressbook 43005



Can't reproduce this, but it's clear from the code that if an error
occurs @book will be NULL in this function, so we guard against it.

Chris
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1417
diff -u -r1.1417 ChangeLog
--- ChangeLog	16 May 2003 20:10:00 -0000	1.1417
+++ ChangeLog	18 May 2003 07:53:46 -0000
@@ -1,3 +1,9 @@
+2003-05-18  Chris Toshok  <toshok ximian com>
+
+	* backend/ebook/e-destination.c (use_default_book_cb): handle the
+	case where @book == NULL, which can happen if there was a problem
+	opening the default book.  Should fix #43005.
+
 2003-05-16  Anna Marie Dirks  <anna ximian com>
 
 	* gui/contact-list-editor/contact-list-editor.glade:  Added 
Index: backend/ebook/e-destination.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/backend/ebook/e-destination.c,v
retrieving revision 1.56
diff -u -r1.56 e-destination.c
--- backend/ebook/e-destination.c	8 Apr 2003 17:21:11 -0000	1.56
+++ backend/ebook/e-destination.c	18 May 2003 07:53:46 -0000
@@ -1039,12 +1039,13 @@
 use_default_book_cb (EBook *book, gpointer closure)
 {
 	EDestination *dest = E_DESTINATION (closure);
-	if (dest->priv->cardify_book == NULL) {
+	if (book != NULL && dest->priv->cardify_book == NULL) {
 		dest->priv->cardify_book = book;
 		g_object_ref (book);
 	}
 	
-	launch_cardify_query (dest);
+	if (dest->priv->cardify_book)
+		launch_cardify_query (dest);
 }
 
 


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