[evolution-patches] fix for addressbook bug #60873



This was happening because reflow happens in an idle handler.  we were
calling free_data in e-addressbook-model when we sometimes weren't
emitting model_changed.  If the reflow idle handler was called before
the async ebook callback, we crashed.  The callback already calls
free_data, so we just need to move it into the block where we emit
model_changed.

nasty bug.

Chris
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1790
diff -u -r1.1790 ChangeLog
--- ChangeLog	12 Jul 2004 18:28:08 -0000	1.1790
+++ ChangeLog	14 Jul 2004 22:27:24 -0000
@@ -1,3 +1,12 @@
+2004-07-14  Chris Toshok  <toshok ximian com>
+
+	[ fixes #60873, and possibly other crashes ]
+	
+	* gui/widgets/e-addressbook-model.c (get_view): don't call
+	free_data before potentially making an async call.  Or rather,
+	don't call free_data without ensure we'll be emitting
+	MODEL_CHANGED shortly after.
+
 2004-07-12  Chris Toshok  <toshok ximian com>
 
 	[ fixes #61299 ]
Index: gui/widgets/e-addressbook-model.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-addressbook-model.c,v
retrieving revision 1.62
diff -u -r1.62 e-addressbook-model.c
--- gui/widgets/e-addressbook-model.c	8 Jun 2004 22:11:48 -0000	1.62
+++ gui/widgets/e-addressbook-model.c	14 Jul 2004 22:27:24 -0000
@@ -501,7 +501,6 @@
 			limit = atoi (limit_str);
 
 		remove_book_view(model);
-		free_data (model);
 
 		if (model->first_get_view) {
 			model->first_get_view = FALSE;
@@ -509,6 +508,8 @@
 			if (e_book_check_static_capability (model->book, "do-initial-query")) {
 				success = e_book_async_get_book_view (model->book, model->query, NULL, limit, book_view_loaded, model);
 			} else {
+				free_data (model);
+
 				g_signal_emit (model,
 					       eab_model_signals [MODEL_CHANGED], 0);
 				g_signal_emit (model,


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