[gtk+/wip/carlosg/event-delivery: 89/104] widget: Make sure we're not calling _get_parent on NULL
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/event-delivery: 89/104] widget: Make sure we're not calling _get_parent on NULL
- Date: Thu, 25 May 2017 14:47:35 +0000 (UTC)
commit eef33d34d45370f8fc6da0b8be58cdf44b8507d2
Author: Timm Bäder <mail baedert org>
Date: Wed May 10 18:08:43 2017 +0200
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.
gtk/gtkwidget.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 17158c2..bdffa04 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]