[gtk+/gtk-3-8] Make treeview cursor handling a bit more robust
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-8] Make treeview cursor handling a bit more robust
- Date: Thu, 21 Nov 2013 02:08:20 +0000 (UTC)
commit 7e0434cfcdebde0b560db071bbe9133fed028dd2
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 30 13:57:33 2013 -0400
Make treeview cursor handling a bit more robust
Clearing the model in a GtkTreeSelection::changed handler was
crashing. While it is not a 100% kosher thing to do, lets be
more robust here.
gtk/gtktreeview.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index ce46b74..cd27848 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -13219,7 +13219,8 @@ gtk_tree_view_real_set_cursor (GtkTreeView *tree_view,
*/
_gtk_tree_view_find_node (tree_view, path, &new_tree, &new_node);
- if (tree_view->priv->cursor_node != new_node)
+ if (tree_view->priv->cursor_node == NULL ||
+ tree_view->priv->cursor_node != new_node)
return;
if (flags & CLAMP_NODE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]