[PATCH 1/2] keyboard: do not crash when input panel is not available

Olivier Blin olivier.blin at softathome.com
Tue Sep 16 10:13:16 PDT 2014


---
 clients/keyboard.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/clients/keyboard.c b/clients/keyboard.c
index 7c11cec..57f8568 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);
 
-- 
2.1.0

-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
-- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome.s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.


More information about the wayland-devel mailing list