keyboard: do not crash when input panel is not available

[Pekka Paalanen: whitespace fix]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Olivier Blin 10 years ago committed by Pekka Paalanen
parent 22e16b656f
commit 814f0ee5a6
  1. 5
      clients/keyboard.c

@ -995,6 +995,11 @@ main(int argc, char *argv[])
display_set_user_data(virtual_keyboard.display, &virtual_keyboard); display_set_user_data(virtual_keyboard.display, &virtual_keyboard);
display_set_global_handler(virtual_keyboard.display, global_handler); 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); output = display_get_output(virtual_keyboard.display);
keyboard_create(output, &virtual_keyboard); keyboard_create(output, &virtual_keyboard);

Loading…
Cancel
Save