if (!input_method) return;
+ resource = wl_resource_create(client, &wl_input_method_interface, 1, id);
+ if (EINA_UNLIKELY(!resource))
+ return;
+
if (input_method->resource)
{
wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT,
return;
}
- resource = wl_resource_create(client, &wl_input_method_interface, 1, id);
-
input_method->resource = resource;
- if (resource)
- {
- wl_resource_set_implementation(resource, NULL, input_method,
- _e_text_input_method_cb_unbind);
- }
+ wl_resource_set_implementation(resource, NULL, input_method,
+ _e_text_input_method_cb_unbind);
}
static void