From: Lenny Komow Date: Thu, 11 Aug 2016 16:57:38 +0000 (-0600) Subject: demos: Fix useless NULL check in cube and tri X-Git-Tag: upstream/1.1.92~2742 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=022bc2a23d213541b16419784317c91080caedef;p=platform%2Fupstream%2FVulkan-Tools.git demos: Fix useless NULL check in cube and tri --- diff --git a/demos/cube.c b/demos/cube.c index c6d7d79..17617e5 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -2947,7 +2947,7 @@ static void demo_init_connection(struct demo *demo) { int scr; demo->connection = xcb_connect(NULL, &scr); - if (demo->connection == NULL) { + if (xcb_connection_has_error(demo->connection) > 0) { printf("Cannot find a compatible Vulkan installable client driver " "(ICD).\nExiting ...\n"); fflush(stdout); diff --git a/demos/tri.c b/demos/tri.c index 35d33f2..9baa23a 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -2418,7 +2418,7 @@ static void demo_init_connection(struct demo *demo) { int scr; demo->connection = xcb_connect(NULL, &scr); - if (demo->connection == NULL) { + if (xcb_connection_has_error(demo->connection) > 0) { printf("Cannot find a compatible Vulkan installable client driver " "(ICD).\nExiting ...\n"); fflush(stdout);