From c27fc3537b3fb83d1551b72b2fc468567c79e6e0 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Fri, 31 Jan 2020 00:39:57 +0100 Subject: [PATCH] wayland/data-device: Guard against a potential crash https://gitlab.gnome.org/GNOME/mutter/merge_requests/1031 --- src/wayland/meta-wayland-data-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index 9a4ba9a92..121d3e244 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -1087,7 +1087,8 @@ drag_grab_button (MetaWaylandPointerGrab *grab, } else { - meta_wayland_data_source_set_current_offer (source, NULL); + if (source) + meta_wayland_data_source_set_current_offer (source, NULL); meta_wayland_data_device_set_dnd_source (&seat->data_device, NULL); unset_selection_source (&seat->data_device, META_SELECTION_DND); success= FALSE;