summaryrefslogtreecommitdiff
path: root/clients/keyboard.c
diff options
context:
space:
mode:
authorOlivier Blin <olivier.blin@softathome.com>2014-09-16 19:13:16 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2014-09-17 13:52:09 +0300
commit814f0ee5a634601f9c4cf36ac1a5147826192509 (patch)
treee0af2e5aab00d41b8544e5e1fb5a7d1b0f9ba89b /clients/keyboard.c
parent22e16b656f67ee577e32a7af91f443840fc3aee1 (diff)
downloadweston-814f0ee5a634601f9c4cf36ac1a5147826192509.tar.gz
weston-814f0ee5a634601f9c4cf36ac1a5147826192509.tar.bz2
weston-814f0ee5a634601f9c4cf36ac1a5147826192509.zip
keyboard: do not crash when input panel is not available
[Pekka Paalanen: whitespace fix] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'clients/keyboard.c')
-rw-r--r--clients/keyboard.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clients/keyboard.c b/clients/keyboard.c
index 7c11cec5..2579571e 100644
--- a/clients/keyboard.c
+++ b/clients/keyboard.c
@@ -995,6 +995,11 @@ main(int argc, char *argv[])
display_set_user_data(virtual_keyboard.display, &virtual_keyboard);
display_set_global_handler(virtual_keyboard.display, global_handler);
+ if (virtual_keyboard.input_panel == NULL) {
+ fprintf(stderr, "No input panel global\n");
+ return -1;
+ }
+
output = display_get_output(virtual_keyboard.display);
keyboard_create(output, &virtual_keyboard);