From fc75a204d575315b4369a4ea57d67049b5496dd9 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 4 Mar 2016 00:22:04 +0100 Subject: [PATCH] Check table exists. --- source/rofi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/rofi.c b/source/rofi.c index 97d15702..21723770 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -699,6 +699,10 @@ int main ( int argc, char *argv[] ) xkb.state = xkb_x11_state_new_from_device ( xkb.keymap, xcb->connection, xkb.device_id ); xkb.compose.table = xkb_compose_table_new_from_locale ( xkb.context, setlocale ( LC_CTYPE, NULL ), 0 ); + if ( xkb.compose.table == NULL ) { + fprintf(stderr, "Failed to load compose table.\n"); + return EXIT_FAILURE; + } xkb.compose.state = xkb_compose_state_new ( xkb.compose.table, 0 ); x11_setup ( &xkb );