From c8433438a59166ef687be74e5ecd41ae3cbe40e4 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Wed, 13 May 2020 17:18:01 +0900 Subject: [PATCH] subsurface: check parameters unlikely to be false with EINA_SAFETY. Change-Id: I69ae13e2018c6c5155f5ccf416870aec6f5705d7 --- src/bin/e_comp_wl_subsurface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))) { -- 2.34.1