From 59202013a86d14b7eee5a38eb3927d63f59b6716 Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Mon, 2 Nov 2020 17:26:32 +0900 Subject: [PATCH] e_comp_wl_input: check ec's cdata before accessing it Change-Id: I8795c6fbd2e7f67987c659eb9f71afba85816e92 --- src/bin/e_comp_wl_input.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 66b2268163..c1445f47a9 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -129,9 +129,13 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou EC_CHANGED(ec); /* Set fuctions to prevent unwanted handling by shell */ - cdata->shell.surface = surface_resource; - cdata->shell.configure = _e_comp_wl_input_pointer_configure; - cdata->shell.map = _e_comp_wl_input_pointer_map; + cdata = e_client_cdata_get(ec); + if (cdata) + { + cdata->shell.surface = surface_resource; + cdata->shell.configure = _e_comp_wl_input_pointer_configure; + cdata->shell.map = _e_comp_wl_input_pointer_map; + } e_client_layer_set(ec, E_LAYER_CLIENT_CURSOR); ec->is_cursor = EINA_TRUE; -- 2.34.1