[PATCH 2/2] editor: do not crash when text input manager is not available

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


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

diff --git a/clients/editor.c b/clients/editor.c
index 66cba0b..03cf550 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -1359,6 +1359,11 @@ main(int argc, char *argv[])
 	display_set_user_data(editor.display, &editor);
 	display_set_global_handler(editor.display, global_handler);
 
+        if (editor.text_input_manager == NULL) {
+		fprintf(stderr, "No text input manager global\n");
+		return -1;
+	}
+
 	editor.window = window_create(editor.display);
 	editor.widget = window_frame_create(editor.window, &editor);
 
-- 
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