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:
parent
261622733c
commit
4f6ea16c2e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user