subsurface: check validation of ec at the entry of EINTERN function. 48/238348/2
authorSeunghun Lee <shiin.lee@samsung.com>
Mon, 13 Jul 2020 04:22:38 +0000 (13:22 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 13 Jul 2020 09:22:24 +0000 (09:22 +0000)
Change-Id: Ia8cf1d2cc5dfbb7dbf47bb2edbe0ef53d16ad6fd

src/bin/e_comp_wl_subsurface.c

index 69c2152..e199bd6 100644 (file)
@@ -164,7 +164,6 @@ _e_comp_wl_subsurface_below_obj_destroy(E_Client *ec)
 static void
 _e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec)
 {
-   if (!ec || e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return;
    if (ec->comp_data->sub.data)
      {
          E_Client *topmost = e_comp_wl_topmost_parent_get(ec);
@@ -1197,5 +1196,10 @@ e_comp_wl_normal_subsurface_has(E_Client *ec)
 EINTERN void
 e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec)
 {
+   EINA_SAFETY_ON_NULL_RETURN(ec);
+
+   if ((e_object_is_del(E_OBJECT(ec))) || (!ec->comp_data))
+     return;
+
    _e_comp_wl_subsurface_check_below_bg_rectangle(ec);
 }