From: Jihoon Kim Date: Thu, 24 Sep 2020 04:59:18 +0000 (+0900) Subject: Fix issue detected by static analysis tool X-Git-Tag: submit/tizen/20200924.053851~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c8a47c22b72f8a3d40b697aa820b0bb9a7fe902;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-wl-textinput.git Fix issue detected by static analysis tool Change-Id: I653bdb2a2f26c1f3cdcfaa84173261b19f5a0582 Signed-off-by: Jihoon Kim --- diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 99b977f..763ab81 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -1477,24 +1477,33 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource * } #endif - if (input_method && input_method->resource && input_method->context && input_method->context->resource) + if (input_method) { - /* DO NOT show input panel surface until we get message "show complete" from input method, - * in order to give a change to update UI */ - LOGD("IM::SHOW::WAIT_FOR_READY\n"); + if (input_method->resource && input_method->context && input_method->context->resource) + { + /* DO NOT show input panel surface until we get message "show complete" from input method, + * in order to give a change to update UI */ + LOGD("IM::SHOW::WAIT_FOR_READY\n"); - g_show_client = client; - wl_input_method_send_show_input_panel(input_method->resource, input_method->context->resource); + g_show_client = client; + wl_input_method_send_show_input_panel(input_method->resource, input_method->context->resource); - /* we need to force update in order to release buffer - * if we do not, client can't update - * because they may in manual render state by frame callback mechanism, - * and also don't have released buffer */ - e_input_panel_wait_update_set(EINA_TRUE); + /* we need to force update in order to release buffer + * if we do not, client can't update + * because they may in manual render state by frame callback mechanism, + * and also don't have released buffer */ + e_input_panel_wait_update_set(EINA_TRUE); + } + else + { + LOGW("Failed to send show input panel. inputmethod : %p, input_method->resource : %p, input_method->context : %p", input_method, input_method->resource, input_method->context); + if (input_method->context) + LOGW("Failed to send show input panel. input_method->context->resource : %p", input_method->context->resource); + } } else { - LOGW("Failed to send show input panel. inputmethod : %p, input_method->resource : %p, input_method->context : %p, input_method->context->resource : %p", input_method, input_method->resource, input_method->context, input_method->context->resource); + LOGW("No input method"); } /* If the input panel state was WILL_HIDE, it means that the conformant area information needs to be restored */