projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f354a77
)
gdk: Avoid poking possibly freed memory
author
Carlos Garnacho
<carlosg@gnome.org>
Tue, 8 Oct 2019 15:56:10 +0000
(17:56 +0200)
committer
Carlos Garnacho
<carlosg@gnome.org>
Wed, 9 Oct 2019 08:35:50 +0000
(10:35 +0200)
The event may end up freed after delivery, ensure to keep a ref in order
to emit the matching emulated crossed event matching a proximity event.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2157
gdk/wayland/gdkdevice-wayland.c
patch
|
blob
|
history
diff --git
a/gdk/wayland/gdkdevice-wayland.c
b/gdk/wayland/gdkdevice-wayland.c
index 7a7031d882bea9acc33546d796e7977b6f571e0c..1b66f37b3a56637cef2712c19811a7a352819fa2 100644
(file)
--- a/
gdk/wayland/gdkdevice-wayland.c
+++ b/
gdk/wayland/gdkdevice-wayland.c
@@
-3327,6
+3327,8
@@
gdk_wayland_tablet_flush_frame_event (GdkWaylandTabletData *tablet,
if (!event)
return;
+ g_object_ref (event);
+
switch ((guint) event->any.type)
{
case GDK_MOTION_NOTIFY:
@@
-3367,6
+3369,8
@@
gdk_wayland_tablet_flush_frame_event (GdkWaylandTabletData *tablet,
emulate_crossing (event->any.surface, NULL,
tablet->master, GDK_ENTER_NOTIFY,
GDK_CROSSING_NORMAL, time);
+
+ g_object_unref (event);
}
static GdkEvent *