mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 09:40:19 +00:00
widget: Make sure we're not calling _get_parent on NULL
We already issue the first _get_parent call before even entering that loop, so make sure `parent` is not NULL. This happens when event_widget is already a toplevel, and this change fixes row-dragging in treeviews.
This commit is contained in:
parent
34fdc51392
commit
eef33d34d4
@ -3585,7 +3585,7 @@ _gtk_widget_emulate_press (GtkWidget *widget,
|
||||
next_child = event_widget;
|
||||
parent = _gtk_widget_get_parent (next_child);
|
||||
|
||||
while (parent != widget)
|
||||
while (parent && parent != widget)
|
||||
{
|
||||
next_child = parent;
|
||||
parent = _gtk_widget_get_parent (parent);
|
||||
|
Loading…
Reference in New Issue
Block a user