[evolution-data-server] Bug 627015: Avoid a race condition by launching the thread after initing. Fixes a crash while launch



commit 30cacd1ebabf8488331459f1bb3a1939743e037c
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Mon Aug 16 15:50:15 2010 +0530

    Bug 627015: Avoid a race condition by launching the thread after
    initing. Fixes a crash while launching a composer.

 libedataserverui/e-name-selector.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libedataserverui/e-name-selector.c b/libedataserverui/e-name-selector.c
index 823dedd..96178dd 100644
--- a/libedataserverui/e-name-selector.c
+++ b/libedataserverui/e-name-selector.c
@@ -186,14 +186,15 @@ e_name_selector_init (ENameSelector *name_selector)
 	sections = g_array_new (FALSE, FALSE, sizeof (Section));
 	source_books = g_array_new (FALSE, FALSE, sizeof (SourceBook));
 
-	load_book_thread = g_thread_create (
-		load_books_thread, name_selector, TRUE, NULL);
-
 	name_selector->priv = E_NAME_SELECTOR_GET_PRIVATE (name_selector);
 	name_selector->priv->sections = sections;
 	name_selector->priv->model = e_name_selector_model_new ();
 	name_selector->priv->source_books = source_books;
 	name_selector->priv->load_book_thread = load_book_thread;
+
+	load_book_thread = g_thread_create (
+		load_books_thread, name_selector, TRUE, NULL);
+
 }
 
 /**



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