checked roundtrip_queue return error 03/92003/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 12 Oct 2016 13:17:41 +0000 (22:17 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Thu, 13 Oct 2016 06:16:41 +0000 (15:16 +0900)
Change-Id: I423f470bda52ab17d052aca308a1dedb73896adf

src/wayland-tbm-client.c

index 7813ac2..d6a1dd3 100644 (file)
@@ -402,7 +402,14 @@ wayland_tbm_client_init(struct wl_display *display)
        wl_proxy_set_queue((struct wl_proxy *)wl_registry, wl_queue);
 
        wl_registry_add_listener(wl_registry, &registry_listener, tbm_client);
-       wl_display_roundtrip_queue(display, wl_queue);
+       if (wl_display_roundtrip_queue(display, wl_queue) < 0) {
+               WL_TBM_LOG("Failed to wl_display_roundtrip_queuey\n");
+
+               wl_event_queue_destroy(wl_queue);
+               wl_registry_destroy(wl_registry);
+               free(tbm_client);
+               return NULL;
+       }
 
        wl_event_queue_destroy(wl_queue);
        wl_registry_destroy(wl_registry);