From: Joonbum Ko Date: Mon, 22 Jul 2019 04:20:45 +0000 (+0900) Subject: tpl_wayland_egl_thread: Fixed referencing the wrong pointer. X-Git-Tag: submit/tizen/20190717.043119~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6b024ec58c087cda1245bc58f6a4580f2c9d2bc;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git tpl_wayland_egl_thread: Fixed referencing the wrong pointer. Change-Id: I89705ebaa38092bb925b2d2599df3854c174b5f6 Signed-off-by: Joonbum Ko --- diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index 1714b38..f3c361f 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -1190,11 +1190,15 @@ __cb_get_rotation_capability(struct wl_egl_window *wl_egl_window, TPL_ASSERT(wl_egl_window); int rotation_capability = WL_EGL_WINDOW_TIZEN_CAPABILITY_NONE; - twe_wl_surf_source *source = (twe_wl_surf_source *)private; - if (source->rotation_capability == TPL_TRUE) - rotation_capability = WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_SUPPORTED; - else - rotation_capability = WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_UNSUPPORTED; + struct tizen_private *tizen_private = (struct tizen_private *)private; + + if (tizen_private->data) { + twe_wl_surf_source *source = (twe_wl_surf_source *)tizen_private->data; + if (source->rotation_capability == TPL_TRUE) + rotation_capability = WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_SUPPORTED; + else + rotation_capability = WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_UNSUPPORTED; + } return rotation_capability; } @@ -1206,12 +1210,17 @@ __cb_set_window_serial_callback(struct wl_egl_window *wl_egl_window, TPL_ASSERT(private); TPL_ASSERT(wl_egl_window); - twe_wl_surf_source *source = (twe_wl_surf_source *)private; + struct tizen_private *tizen_private = (struct tizen_private *)private; + + if (tizen_private->data) { + twe_wl_surf_source *source = (twe_wl_surf_source *)tizen_private->data; - source->set_serial_is_used = TPL_TRUE; - source->serial = serial; + source->set_serial_is_used = TPL_TRUE; + source->serial = serial; + } } + static void __cb_tss_flusher_flush_callback(void *data, struct tizen_surface_shm_flusher *tss_flusher) {