devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5b2580b62e3fed580bb29580333e3276b7346c9e

commit 5b2580b62e3fed580bb29580333e3276b7346c9e
Author: Chris Michael <cpmich...@osg.samsung.com>
Date:   Tue Feb 16 15:51:58 2016 -0500

    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 <cpmich...@osg.samsung.com>
---
 src/lib/ecore_x/xlib/ecore_x_dnd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/lib/ecore_x/xlib/ecore_x_dnd.c 
b/src/lib/ecore_x/xlib/ecore_x_dnd.c
index 601c8ce..d673094 100644
--- a/src/lib/ecore_x/xlib/ecore_x_dnd.c
+++ b/src/lib/ecore_x/xlib/ecore_x_dnd.c
@@ -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;
 

-- 


Reply via email to