]> Pileus Git - ~andy/gtk/commitdiff
treeview: Don't emit cursor-changed in destruction
authorJohn Lindgren <john.lindgren@aol.com>
Wed, 13 Mar 2013 01:03:45 +0000 (02:03 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 13 Mar 2013 01:06:29 +0000 (02:06 +0100)
This is a workaround until we have a good idea on how we want to handle
signal disconnection before/during/after dispose and destroy vfunc
calls.

https://bugzilla.gnome.org/show_bug.cgi?id=671939

gtk/gtktreeview.c

index 21873d775bd3c34d8ba9c3aad8f482dce97d4ee5..4544c6f6da614c1c7f31bc43bb8659e8c0226bac 100644 (file)
@@ -13238,7 +13238,8 @@ gtk_tree_view_real_set_cursor (GtkTreeView     *tree_view,
                                            GTK_CELL_RENDERER_FOCUSED);
     }
 
-  g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0);
+  if (!gtk_widget_in_destruction (GTK_WIDGET (tree_view)))
+    g_signal_emit (tree_view, tree_view_signals[CURSOR_CHANGED], 0);
 }
 
 /**