aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLenny Komow <lenny@lunarg.com>2016-08-11 10:57:38 -0600
committerLenny Komow <lenny@lunarg.com>2016-08-11 10:57:38 -0600
commit022bc2a23d213541b16419784317c91080caedef (patch)
tree42dea639c7fc59c6b0283ba5e1768d38d3837fef
parent6d8fdfdb1f6cdcf127c2ad90d3726505e33e8080 (diff)
downloadusermoji-022bc2a23d213541b16419784317c91080caedef.tar.xz
demos: Fix useless NULL check in cube and tri
-rw-r--r--demos/cube.c2
-rw-r--r--demos/tri.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/demos/cube.c b/demos/cube.c
index c6d7d79c..17617e5e 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 35d33f2b..9baa23a5 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);