ilmControl: check for valid controller on init
authorMarcus Fritzsch <marcus.fritzsch@xse.de>
Tue, 12 Aug 2014 11:28:02 +0000 (13:28 +0200)
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
Mon, 1 Sep 2014 06:55:43 +0000 (15:55 +0900)
Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c

index 0b88998..5b77fc5 100644 (file)
@@ -1187,6 +1187,12 @@ init_control(void)
     // third level objects: ivi_controller_surfaces/layers properties
     display_roundtrip_queue(wl->display, wl->queue);
 
+    if (! wl->controller)
+    {
+        fputs("ivi_controller not available\n", stderr);
+        return -1;
+    }
+
     ret = pthread_create(&ctx->thread, NULL, control_thread, NULL);
 
     if (ret != 0) {