e_comp_wl: remove a frame resource from cached frame list. 03/242003/3
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 21 Aug 2020 18:29:13 +0000 (03:29 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Sun, 23 Aug 2020 23:38:06 +0000 (23:38 +0000)
this fixes a crash caused by trying to an invalid frame resource which
is destroyed, but dangling from cached frame list.

Change-Id: I3cf097c4b493fec3090a06dfa7f766b934ac2873

src/bin/e_comp_wl.c

index d65180c518a40c35690ffa418dbb929390359fa1..fe3352937f641e9d73ef4f745a78c31c8d200e99 100644 (file)
@@ -2843,6 +2843,7 @@ static void
 _e_comp_wl_frame_cb_destroy(struct wl_resource *resource)
 {
    E_Client *ec;
+   E_Comp_Wl_Subsurf_Data *sdata;
 
    if (!(ec = wl_resource_get_user_data(resource))) return;
    if (e_object_is_del(E_OBJECT(ec)))
@@ -2863,6 +2864,13 @@ _e_comp_wl_frame_cb_destroy(struct wl_resource *resource)
         ec->comp_data->pending.frames =
           eina_list_remove(ec->comp_data->pending.frames, resource);
      }
+
+   sdata = ec->comp_data->sub.data;
+   if ((sdata) && (sdata->cached.frames))
+     {
+        sdata->cached.frames =
+           eina_list_remove(sdata->cached.frames, resource);
+     }
 }
 
 static void