wayland_shm: Check tbm_client validation. 89/244689/1 accepted/tizen/unified/20200924.001846 submit/tizen/20200923.083532
authorWoochanlee <wc0917.lee@samsung.com>
Wed, 23 Sep 2020 08:05:22 +0000 (17:05 +0900)
committerWoochanlee <wc0917.lee@samsung.com>
Wed, 23 Sep 2020 08:05:22 +0000 (17:05 +0900)
In certain use case, the tbm_client has been deinited when _evas_outbuf_redraws_clear called.
It cause crash.

Change-Id: Ibdc75b3cf66a541e5ac5568e604c54a137f2eb8d

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
src/modules/evas/engines/wayland_shm/evas_outbuf.c

index 8466320..31ae764 100644 (file)
@@ -3256,7 +3256,10 @@ _ecore_evas_wl_common_evas_engine_rsc_free(Ecore_Evas *ee)
         if (einfo && einfo->info.tbm_client)
           {
             if (_ecore_evas_wl_init_count == 1)
-              wayland_tbm_client_deinit(einfo->info.tbm_client);
+              {
+                 wayland_tbm_client_deinit(einfo->info.tbm_client);
+                 einfo->info.tbm_client = NULL;
+              }
           }
       }
 }
index e520f9c..73564b4 100755 (executable)
@@ -519,7 +519,8 @@ _evas_outbuf_redraws_clear(Outbuf *ob)
    wls = ecore_wl2_window_surface_get(ob->info->info.wl2_win);
    if (wls)
      {
-        ecore_wl2_surface_set_serial(ob->surface, ob->info->info.serial);
+        if (ob->info->info.tbm_client)
+          ecore_wl2_surface_set_serial(ob->surface, ob->info->info.serial);
         ecore_wl2_surface_post(ob->surface, ob->priv.rects, ob->priv.rect_count);
      }