keyboard: do not crash when input panel is not available

[Pekka Paalanen: whitespace fix]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Olivier Blin 2014-09-16 19:13:16 +02:00 committed by Pekka Paalanen
parent 22e16b656f
commit 814f0ee5a6
1 changed files with 5 additions and 0 deletions

View File

@ -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);