From: Woochanlee Date: Wed, 23 Sep 2020 08:05:22 +0000 (+0900) Subject: wayland_shm: Check tbm_client validation. X-Git-Tag: accepted/tizen/unified/20200924.001846^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2eb262be539ebe1125c5a57411db3a6047d5370b;p=platform%2Fupstream%2Fefl.git wayland_shm: Check tbm_client validation. In certain use case, the tbm_client has been deinited when _evas_outbuf_redraws_clear called. It cause crash. Change-Id: Ibdc75b3cf66a541e5ac5568e604c54a137f2eb8d --- diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 8466320..31ae764 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -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; + } } } } diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c index e520f9c..73564b4 100755 --- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c @@ -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); }