Add missing surface lock
[platform/core/uifw/e-mod-tizen-wl-textinput.git] / src / e_mod_input_panel.c
index fc7b586..59a65d9 100644 (file)
@@ -1036,7 +1036,10 @@ _e_input_panel_cb_surface_get(struct wl_client *client, struct wl_resource *reso
    evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_DOWN, _e_ips_cb_mouse_down, ec);
    evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOUSE_MOVE, _e_ips_cb_mouse_move, ec);
 
+   g_mutex_lock(&cdata->surface_mutex);
    cdata->surface = surface_resource;
+   g_mutex_unlock(&cdata->surface_mutex);
+
    cdata->shell.configure_send = NULL;
    cdata->shell.configure = _e_input_panel_surface_configure;
    cdata->shell.ping = NULL;