[mutter] wayland/data-device: Guard against a potential crash



commit c27fc3537b3fb83d1551b72b2fc468567c79e6e0
Author: Robert Mader <robert mader posteo de>
Date:   Fri Jan 31 00:39:57 2020 +0100

    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;


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