subsurface: check parameters unlikely to be false with EINA_SAFETY. 21/241221/2
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 13 May 2020 08:18:01 +0000 (17:18 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Sun, 23 Aug 2020 23:36:31 +0000 (23:36 +0000)
Change-Id: I69ae13e2018c6c5155f5ccf416870aec6f5705d7

src/bin/e_comp_wl_subsurface.c

index 95e68f10a21b7c3115658f5f3a7af82c14b44560..da985f58256ab16b4c4099e04994c4bd858c0587 100644 (file)
@@ -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)))
      {