Patch: avoid crash in notify view add



	Hi,

	This patch avoids a really difficult to reproduce crash happening in
notify_views_add.

Changelog entry:
	* libtinymailui-gtk/tny-gtk-header-list-model.c (notify_views_add_destroy):
	protect timeout_span and add_timeout with ra_lock to avoid possible
	crashes.



-- 
José Dapena Paz <jdapena igalia com>
Igalia
diff --git a/libtinymailui-gtk/tny-gtk-header-list-model.c b/libtinymailui-gtk/tny-gtk-header-list-model.c
index 8e78ab3..a05c6ae 100644
--- a/libtinymailui-gtk/tny-gtk-header-list-model.c
+++ b/libtinymailui-gtk/tny-gtk-header-list-model.c
@@ -603,12 +603,12 @@ notify_views_add_destroy (gpointer data)
 
 	g_mutex_lock (priv->ra_lock);
 	priv->updating_views = -1;
+	g_mutex_unlock (priv->ra_lock);
 
 	if (priv->timeout_span < 5000)
 		priv->timeout_span += 500;
 	priv->add_timeout = 0;
 	g_object_unref (data);
-	g_mutex_unlock (priv->ra_lock);
 
 	return;
 }


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