From: Derek Foreman Date: Tue, 22 Nov 2016 19:00:38 +0000 (-0600) Subject: weston-terminal: Fix crash on first keystroke X-Git-Tag: upstream/5.0.0~745 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b685d9de939d7ab3886882d1f816c26abbf25c1;p=platform%2Fupstream%2Fweston.git weston-terminal: Fix crash on first keystroke Since 894b3rcc634 weston-terminal will crash on first keystroke if you fail to create an xkb compose state. This can happen if you don't have a Compose file. Instead, now we just return uncomposed symbols. Signed-off-by: Derek Foreman Reviewed-by: Daniel Stone --- diff --git a/clients/window.c b/clients/window.c index a82f05cb..ac35c3d6 100644 --- a/clients/window.c +++ b/clients/window.c @@ -3108,6 +3108,8 @@ static xkb_keysym_t process_key_press(xkb_keysym_t sym, struct input *input) { #ifdef HAVE_XKBCOMMON_COMPOSE + if (!input->xkb.compose_state) + return sym; if (sym == XKB_KEY_NoSymbol) return sym; if (xkb_compose_state_feed(input->xkb.compose_state,