[cheese/gnome-2-32] cheese-thumb-view: guard thread unsafe operations



commit 612327f9f3123ba01f1ce9084116bc4b8e97648e
Author: Luciana Fujii Pontello <luciana fujii eti br>
Date:   Tue Apr 19 14:50:44 2011 -0300

    cheese-thumb-view: guard thread unsafe operations
    
    Cheese was crashing in gtk_icon_theme_load_icon because there were
    operations that are not thread safe that were done before
    gdk_threads_enter.

 src/cheese-thumb-view.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/cheese-thumb-view.c b/src/cheese-thumb-view.c
index 18c1fb7..48f5c77 100644
--- a/src/cheese-thumb-view.c
+++ b/src/cheese-thumb-view.c
@@ -135,6 +135,8 @@ cheese_thumb_view_thread_append_item (gpointer data)
   g_free (thumb_loc);
   g_free (uri);
 
+  gdk_threads_enter ();
+
   if (!pixbuf)
   {
     gchar  *escape = NULL;
@@ -157,8 +159,6 @@ cheese_thumb_view_thread_append_item (gpointer data)
     eog_thumbnail_add_frame (&pixbuf);
   }
 
-  gdk_threads_enter ();
-
   gtk_list_store_set (priv->store, &iter,
                       THUMBNAIL_PIXBUF_COLUMN, pixbuf, -1);
 



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