forked from enlightenment/efl
Check for valid returns of ecore_wl_registry_get and
ecore_wl_globals_get before trying to use them. After we have bound a text input manager, there is no need to keep looping the globals, so break out. Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
7fa2c11e72
commit
449c0c72b0
|
@ -95,8 +95,14 @@ im_module_create()
|
||||||
if (!text_input_manager)
|
if (!text_input_manager)
|
||||||
{
|
{
|
||||||
Ecore_Wl_Global *global;
|
Ecore_Wl_Global *global;
|
||||||
struct wl_registry *registry = ecore_wl_registry_get();
|
struct wl_registry *registry;
|
||||||
struct wl_list *globals = ecore_wl_globals_get();
|
struct wl_list *globals;
|
||||||
|
|
||||||
|
if (!(registry = ecore_wl_registry_get()))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!(globals = ecore_wl_globals_get()))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
wl_list_for_each(global, globals, link)
|
wl_list_for_each(global, globals, link)
|
||||||
{
|
{
|
||||||
|
@ -107,6 +113,7 @@ im_module_create()
|
||||||
&wl_text_input_manager_interface, 1);
|
&wl_text_input_manager_interface, 1);
|
||||||
EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom,
|
EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom,
|
||||||
"bound wl_text_input_manager interface");
|
"bound wl_text_input_manager interface");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue