From 5b2580b62e3fed580bb29580333e3276b7346c9e Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 16 Feb 2016 15:51:58 -0500 Subject: [PATCH] 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 --- 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 601c8ce4f8..d673094807 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;