mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
gtk: fix crash in _gtk_rbtree_find_offset() called from update_prelight()
Move the check for tree_view->priv->tree being NULL into update_prelight() so the function will never call _gtk_rbtree_find_offset() on a NULL rbtree.
This commit is contained in:
parent
ee57066cac
commit
07dc2f6c35
@ -3318,6 +3318,9 @@ update_prelight (GtkTreeView *tree_view,
|
||||
GtkRBTree *tree;
|
||||
GtkRBNode *node;
|
||||
|
||||
if (tree_view->priv->tree == NULL)
|
||||
return;
|
||||
|
||||
if (x == -10000)
|
||||
{
|
||||
ensure_unprelighted (tree_view);
|
||||
@ -10572,10 +10575,9 @@ gtk_tree_view_adjustment_changed (GtkAdjustment *adjustment,
|
||||
dy = tree_view->priv->dy - (int) tree_view->priv->vadjustment->value;
|
||||
if (dy)
|
||||
{
|
||||
if (tree_view->priv->tree)
|
||||
update_prelight (tree_view,
|
||||
tree_view->priv->event_last_x,
|
||||
tree_view->priv->event_last_y - dy);
|
||||
update_prelight (tree_view,
|
||||
tree_view->priv->event_last_x,
|
||||
tree_view->priv->event_last_y - dy);
|
||||
|
||||
if (tree_view->priv->edited_column &&
|
||||
GTK_IS_WIDGET (tree_view->priv->edited_column->editable_widget))
|
||||
|
Loading…
Reference in New Issue
Block a user