ecore-x: Add safety checks for NULL _ecore_x_disp in dnd functions

xlib immediately crashes upon being passed a NULL display object,
so every function in ecore-x should likely have safety checks such as
these.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
Chris Michael 2016-02-16 15:51:58 -05:00
parent 471c7635ee
commit 5b2580b62e
1 changed files with 4 additions and 0 deletions

View File

@ -541,6 +541,8 @@ ecore_x_dnd_send_status(Eina_Bool will_accept,
{
XEvent xev;
EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
if (_target->state == ECORE_X_DND_TARGET_IDLE)
return;
@ -591,6 +593,8 @@ ecore_x_dnd_send_finished(void)
{
XEvent xev;
EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
if (_target->state == ECORE_X_DND_TARGET_IDLE)
return;