From 0019f7a45e74a1f11e49c75435e8cc2fa325d2ba Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 8 Aug 2017 01:33:20 +0200 Subject: [PATCH] Wayland: Stop crashing when Compose is unavailable There was a missing check for when no Compose key was configured in the xkb file, making _glfw.wl.xkb.composeState NULL and crashing on key press. Closes #1059. --- src/wl_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wl_init.c b/src/wl_init.c index 40e6e43a..8e42ce6e 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -294,7 +294,7 @@ static int toGLFWKeyCode(uint32_t key) static xkb_keysym_t composeSymbol(xkb_keysym_t sym) { - if (sym == XKB_KEY_NoSymbol) + if (sym == XKB_KEY_NoSymbol || !_glfw.wl.xkb.composeState) return sym; if (xkb_compose_state_feed(_glfw.wl.xkb.composeState, sym) != XKB_COMPOSE_FEED_ACCEPTED)