From: Joonbum Ko Date: Tue, 2 Jan 2024 11:09:34 +0000 (+0900) Subject: handle null exception when printing protocol errors X-Git-Tag: accepted/tizen/unified/20240122.175410~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F304496%2F1;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git handle null exception when printing protocol errors - Sometimes the interface obtained from wl_display_get_protocol_error is NULL when interface has already been destroyed. Change-Id: I0fe2fe9b759682078366bdc5fe4076e9f66a6d8a Signed-off-by: Joonbum Ko --- diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index 8e2d576..5621065 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -524,7 +524,8 @@ _wl_display_print_err(tpl_wl_egl_display_t *wl_egl_display, &err_interface, &err_proxy_id); TPL_ERR("[Protocol Error] interface: %s, error_code: %d, proxy_id: %d", - err_interface->name, err_code, err_proxy_id); + (err_interface ? err_interface->name : "UNKNOWN"), + err_code, err_proxy_id); } wl_egl_display->last_error = errno; diff --git a/src/tpl_wl_vk_thread.c b/src/tpl_wl_vk_thread.c index 319d339..48bf770 100644 --- a/src/tpl_wl_vk_thread.c +++ b/src/tpl_wl_vk_thread.c @@ -418,7 +418,8 @@ _wl_display_print_err(tpl_wl_vk_display_t *wl_vk_display, &err_interface, &err_proxy_id); TPL_ERR("[Protocol Error] interface: %s, error_code: %d, proxy_id: %d", - err_interface->name, err_code, err_proxy_id); + (err_interface ? err_interface->name : "UNKNOWN"), + err_code, err_proxy_id); } wl_vk_display->last_error = errno;