aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-02 18:23:44 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-02 18:23:42 -0400
commitc60fbea89f7c89760c6d4db80b3f6a459a0bf7bd (patch)
treef58cac8985be084dde60373c2e2e2a802c6f63e9
parentecore-wl2: do not unref non-matching input device upon removal (diff)
downloadefl-c60fbea89f7c89760c6d4db80b3f6a459a0bf7bd.tar.gz
ecore-wl2: add null checks for xkb compose pointers
somehow these can fail to be created
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 693a3ad3ea..27efce865a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -891,7 +891,9 @@ _keyboard_cb_keymap(void *data, struct wl_keyboard *keyboard EINA_UNUSED, unsign
input->xkb.compose_table = xkb_compose_table_new_from_locale(input->display->xkb_context,
locale, XKB_COMPOSE_COMPILE_NO_FLAGS);
if (input->xkb.compose_state) xkb_compose_state_unref(input->xkb.compose_state);
- input->xkb.compose_state = xkb_compose_state_new(input->xkb.compose_table, XKB_COMPOSE_STATE_NO_FLAGS);
+ input->xkb.compose_state = NULL;
+ if (input->xkb.compose_table)
+ input->xkb.compose_state = xkb_compose_state_new(input->xkb.compose_table, XKB_COMPOSE_STATE_NO_FLAGS);
{
Ecore_Wl2_Event_Seat_Keymap_Changed *ev = malloc(sizeof(Ecore_Wl2_Event_Seat_Keymap_Changed));