summaryrefslogtreecommitdiffstats
path: root/src/vulkan
diff options
context:
space:
mode:
authorArda Coskunses <[email protected]>2016-12-22 15:03:11 -0700
committerJason Ekstrand <[email protected]>2016-12-22 14:09:46 -0800
commit99de7b752546c3f87aa8a18f72fd46856270555f (patch)
treef9f2c7b4d29a21822bb9ae9df8eb57fd985e44d5 /src/vulkan
parent01dd363e671ac3a457bc3ff60b43b04e108c33fc (diff)
vulkan/wsi/x11: don't crash on null wsi x11 connection
Without this check driver crash when application window closed unexpectedly. Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "13.0" <[email protected]>
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/wsi/wsi_common_x11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 037aa50ba2a..71268388484 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -261,6 +261,9 @@ VkBool32 wsi_get_physical_device_xcb_presentation_support(
struct wsi_x11_connection *wsi_conn =
wsi_x11_get_connection(wsi_device, alloc, connection);
+ if (!wsi_conn)
+ return false;
+
if (!wsi_conn->has_dri3) {
fprintf(stderr, "vulkan: No DRI3 support\n");
return false;