summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vulkan/wsi/wsi_common_x11.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 814284799f6..eee2359d03a 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -118,6 +118,8 @@ wsi_x11_get_connection(struct wsi_device *wsi_dev,
struct wsi_x11_connection *wsi_conn =
wsi_x11_connection_create(alloc, conn);
+ if (!wsi_conn)
+ return NULL;
pthread_mutex_lock(&wsi->mutex);