if we dont get the userdata of a offer something in the protocol went
very very bad, we should not emit there a error, just return.
Also if we are getting a null offer we should dereference the nulled out
offer object.
This fixes CID 1363214
if (!input->drag)
{
ERR("Userdata of offer not found");
- goto emit;
+ return;
}
input->drag->serial = serial;
input->drag = NULL;
}
-emit:
ev = calloc(1, sizeof(Ecore_Wl2_Event_Dnd_Enter));
if (!ev) return;
if (input->focus.keyboard)
ev->source = input->focus.keyboard->id;
+ if (input->drag)
+ ev->win = input->drag->window_id;
- ev->win = input->drag->window_id;
ev->x = x;
ev->y = y;
ev->offer = input->drag;