[gtk/wip/baedert/for-master] widget: Fix a transform leak in pick()



commit 9f3859802b9a8e61409d217b38cf0851957b7d29
Author: Timm Bäder <mail baedert org>
Date:   Sat Jan 25 18:14:13 2020 +0100

    widget: Fix a transform leak in pick()

 gtk/gtkwidget.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 283c5163e3..4b45d8e82d 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10524,11 +10524,16 @@ gtk_widget_do_pick (GtkWidget    *widget,
           graphene_matrix_transform_point3d (&inv, &p0, &p0);
           graphene_matrix_transform_point3d (&inv, &p1, &p1);
           if (fabs (p0.z - p1.z) < 1.f / 4096)
-            continue;
+            {
+              gsk_transform_unref (transform);
+              continue;
+            }
 
           graphene_point3d_interpolate (&p0, &p1, p0.z / (p0.z - p1.z), &res);
         }
 
+      gsk_transform_unref (transform);
+
       picked = gtk_widget_do_pick (child, res.x, res.y, flags);
       if (picked)
         return picked;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]