gdk: fix crash on Wayland with already destroyed surface.
See crash reliably reproduced on GIMP when a popup is destroyed on a drag-begin callback and Wayland data listener callbacks calls the enter() callback with a NULL surface. Cf. https://gitlab.gnome.org/GNOME/gimp/-/issues/10515
This commit is contained in:
parent
802284646f
commit
67438caa3d
@ -1174,6 +1174,9 @@ data_device_enter (void *data,
|
|||||||
GdkWindow *dest_window, *dnd_owner;
|
GdkWindow *dest_window, *dnd_owner;
|
||||||
GdkAtom selection;
|
GdkAtom selection;
|
||||||
|
|
||||||
|
if (!surface)
|
||||||
|
return;
|
||||||
|
|
||||||
dest_window = wl_surface_get_user_data (surface);
|
dest_window = wl_surface_get_user_data (surface);
|
||||||
|
|
||||||
if (!GDK_IS_WINDOW (dest_window))
|
if (!GDK_IS_WINDOW (dest_window))
|
||||||
|
Loading…
Reference in New Issue
Block a user