From: Seunghun Lee Date: Wed, 13 May 2020 08:18:01 +0000 (+0900) Subject: subsurface: check parameters unlikely to be false with EINA_SAFETY. X-Git-Tag: submit/tizen/20200825.082113~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F241221%2F2;p=platform%2Fupstream%2Fenlightenment.git subsurface: check parameters unlikely to be false with EINA_SAFETY. Change-Id: I69ae13e2018c6c5155f5ccf416870aec6f5705d7 --- diff --git a/src/bin/e_comp_wl_subsurface.c b/src/bin/e_comp_wl_subsurface.c index 95e68f10a2..da985f5825 100644 --- a/src/bin/e_comp_wl_subsurface.c +++ b/src/bin/e_comp_wl_subsurface.c @@ -848,6 +848,8 @@ e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl_ E_Comp_Wl_Subsurf_Data *sdata; E_Client *offscreen_parent = NULL; + EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE); + /* try to get the wayland client from the surface resource */ if (!(client = wl_resource_get_client(surface_resource))) { @@ -856,7 +858,7 @@ e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl_ return EINA_FALSE; } - if (!ec || e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return EINA_FALSE; + if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return EINA_FALSE; if (!epc || e_object_is_del(E_OBJECT(epc))) {