Fix defect detected by static analysis tool 45/272945/3
authorInHong Han <inhong1.han@samsung.com>
Mon, 28 Mar 2022 08:34:59 +0000 (17:34 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 28 Mar 2022 09:02:48 +0000 (18:02 +0900)
Change-Id: Ia321275d52d759180af015baddbe6692ca27e8fa

src/e_mod_main.c

index e508811..9a895b3 100644 (file)
@@ -504,6 +504,7 @@ static void
 _e_text_input_method_context_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
 {
    E_Input_Method_Context *context = wl_resource_get_user_data(resource);
+   EINA_SAFETY_ON_NULL_GOTO(context, err);
 
    LOGD("resource(%p), context(%p), context->input(%p), context->input_method(%p)", resource, context, context->input, context->input_method);
 
@@ -1307,6 +1308,8 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource
    client_surface_ec = ec;
 
    text_input = wl_resource_get_user_data(resource);
+   EINA_SAFETY_ON_NULL_GOTO(text_input, err);
+
    g_text_input = text_input;
    g_client = client;