wayland: Protect against NULL offers on gdk_drag_status() implementation

If we're called untimely, we might end up crashing here when poking the
NULL wl_data_offer.
This commit is contained in:
Carlos Garnacho 2016-01-20 18:55:51 +01:00
parent 261622733c
commit 4f6ea16c2e

View File

@ -315,7 +315,7 @@ gdk_wayland_drag_context_drop_finish (GdkDragContext *context,
selection = gdk_drag_get_selection (context);
wl_offer = gdk_wayland_selection_get_offer (display, selection);
if (success && wayland_context->selected_action &&
if (wl_offer && success && wayland_context->selected_action &&
wayland_context->selected_action != GDK_ACTION_ASK)
{
gdk_wayland_drag_context_commit_status (context);