ecore_x: Only send XdndEnter when we have types

If ecore_x_window_prop_property_get fails, we have no types to drop so
don't send XdndEnter.

Fixes CID 1039693
This commit is contained in:
Sebastian Dransfeld 2013-12-07 15:49:45 +01:00
parent 31fde249d4
commit d09ceaf4c1
1 changed files with 26 additions and 24 deletions

View File

@ -685,12 +685,13 @@ _ecore_x_dnd_drag(Ecore_X_Window root,
unsigned char *data;
Ecore_X_Atom *types;
ecore_x_window_prop_property_get(_source->win,
if (ecore_x_window_prop_property_get(_source->win,
ECORE_X_ATOM_XDND_TYPE_LIST,
XA_ATOM,
32,
&data,
&num);
&num))
{
types = (Ecore_X_Atom *)data;
/* Entered new window, send XdndEnter */
@ -712,6 +713,7 @@ _ecore_x_dnd_drag(Ecore_X_Window root,
XFree(data);
XSendEvent(_ecore_x_disp, win, False, 0, &xev);
if (_ecore_xlib_sync) ecore_x_sync();
}
_source->await_status = 0;
_source->will_accept = 0;
}