summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-06-25 09:31:52 +0100
committerChris Michael <cp.michael@samsung.com>2013-06-25 09:31:52 +0100
commitaa54fcf059b72467516f0e4d438062502b021746 (patch)
treef54f6abb94c24b72147b30af745abff0839f3e9c
parent75639bea4987f36fac3484bdd802b8ca8c462e8d (diff)
Check that ecore_wl_init succeeds before trying to make calls into it.
Fix formatting. Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/ecore_imf/wayland/wayland_module.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/modules/ecore_imf/wayland/wayland_module.c b/src/modules/ecore_imf/wayland/wayland_module.c
index 6b4e337fa5..b7176d96cf 100644
--- a/src/modules/ecore_imf/wayland/wayland_module.c
+++ b/src/modules/ecore_imf/wayland/wayland_module.c
@@ -117,9 +117,10 @@ im_module_init(void)
117 struct wl_list *globals; 117 struct wl_list *globals;
118 Ecore_Wl_Global *global; 118 Ecore_Wl_Global *global;
119 119
120 ecore_wl_init(NULL); 120 if (!ecore_wl_init(NULL)) return EINA_FALSE;
121 121
122 _ecore_imf_wayland_log_dom = eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW); 122 _ecore_imf_wayland_log_dom =
123 eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW);
123 124
124 ecore_wl_display_iterate(); 125 ecore_wl_display_iterate();
125 registry = ecore_wl_registry_get(); 126 registry = ecore_wl_registry_get();
@@ -129,12 +130,16 @@ im_module_init(void)
129 { 130 {
130 if (!strcmp(global->interface, "wl_text_input_manager")) 131 if (!strcmp(global->interface, "wl_text_input_manager"))
131 { 132 {
132 text_input_manager = wl_registry_bind(registry, global->id, &wl_text_input_manager_interface, 1); 133 text_input_manager =
133 EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "bound wl_text_input_manager interface"); 134 wl_registry_bind(registry, global->id,
135 &wl_text_input_manager_interface, 1);
136 EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom,
137 "bound wl_text_input_manager interface");
134 } 138 }
135 } 139 }
136 140
137 ecore_imf_module_register(&wayland_im_info, im_module_create, im_module_exit); 141 ecore_imf_module_register(&wayland_im_info, im_module_create,
142 im_module_exit);
138 EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "im module initalized"); 143 EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "im module initalized");
139 144
140 return EINA_TRUE; 145 return EINA_TRUE;