discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c0bc1be83e55de2b0ed0dc1ad24a8e43461cad5f
commit c0bc1be83e55de2b0ed0dc1ad24a8e43461cad5f Author: Bryce Harrington <[email protected]> Date: Tue Mar 17 19:52:43 2015 -0400 ecore-wayland: Doublecheck input validity Summary: Most of the other ecore-wayland API will return NULL in the (hopefully theoretical) case of bad inputs; this API routine should so similarly for consistency. Reviewers: zmike, cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2181 --- src/lib/ecore_wayland/Ecore_Wayland.h | 2 ++ src/lib/ecore_wayland/ecore_wl_dnd.c | 1 + 2 files changed, 3 insertions(+) diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h index 9460e95..dd1260e 100644 --- a/src/lib/ecore_wayland/Ecore_Wayland.h +++ b/src/lib/ecore_wayland/Ecore_Wayland.h @@ -787,6 +787,8 @@ EAPI Eina_Bool ecore_wl_dnd_drag_get(Ecore_Wl_Input *input, const char *type); EAPI void ecore_wl_dnd_drag_types_set(Ecore_Wl_Input *input, const char **types_offered); /** + * @return the data types being offered for drag-and-drop, or NULL on error + * * @ingroup Ecore_Wl_Dnd_Group * @since 1.8 */ diff --git a/src/lib/ecore_wayland/ecore_wl_dnd.c b/src/lib/ecore_wayland/ecore_wl_dnd.c index 4fd7b05..5165328 100644 --- a/src/lib/ecore_wayland/ecore_wl_dnd.c +++ b/src/lib/ecore_wayland/ecore_wl_dnd.c @@ -398,6 +398,7 @@ ecore_wl_dnd_drag_types_get(Ecore_Wl_Input *input) /* check for valid input. if not, get the default one */ if (!input) input = _ecore_wl_disp->input; + if (!input) return NULL; return &input->data_types; } --
