[empathy] debug-window: prevent using the store when disposing



commit 7c86586442819aa47a4672671211d31cb8e2461a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Feb 3 19:02:12 2014 +0100

    debug-window: prevent using the store when disposing
    
    Using g_signal_connect_object() isn't enought as it prevents from calling the
    callback when the windows has been destroyed but not while disposing it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692793

 src/empathy-debug-window.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c
index b56fe3c..b4392c3 100644
--- a/src/empathy-debug-window.c
+++ b/src/empathy-debug-window.c
@@ -323,11 +323,16 @@ proxy_invalidated_cb (TpProxy *proxy,
     gpointer user_data)
 {
   EmpathyDebugWindow *self = (EmpathyDebugWindow *) user_data;
-  GtkTreeModel *service_store = GTK_TREE_MODEL (self->priv->service_store);
+  GtkTreeModel *service_store;
   TpProxy *stored_proxy;
   GtkTreeIter iter;
   gboolean valid_iter;
 
+  if (self->priv->service_store == NULL)
+    return;
+
+  service_store = GTK_TREE_MODEL (self->priv->service_store);
+
   /* Proxy has been invalidated so we find and set it to NULL
    * in service store */
   gtk_tree_model_get_iter_first (service_store, &iter);


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