summaryrefslogtreecommitdiff
path: root/src/vulkan/wsi/wsi_common_display.c
diff options
context:
space:
mode:
authorIván Briano <ivan.briano@intel.com>2022-10-10 14:45:58 -0700
committerMarge Bot <emma+marge@anholt.net>2023-04-03 20:21:17 +0000
commiteadc64ab24842f478b4d31396c9b2900fc1d3361 (patch)
tree49c159d90b0cce80d6c8eda666128c26613db93b /src/vulkan/wsi/wsi_common_display.c
parent6ad5f885afef6135b4f7b124bdbe5f84d320bc38 (diff)
downloadmesa-eadc64ab24842f478b4d31396c9b2900fc1d3361.tar.gz
mesa-eadc64ab24842f478b4d31396c9b2900fc1d3361.tar.bz2
mesa-eadc64ab24842f478b4d31396c9b2900fc1d3361.zip
vulkan/wsi/display: do not dereference a NULL pointer
Fixes dEQP-VK.wsi.direct_drm.swapchain.simulate_oom.* Cc: mesa-stable Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19025>
Diffstat (limited to 'src/vulkan/wsi/wsi_common_display.c')
-rw-r--r--src/vulkan/wsi/wsi_common_display.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c
index ddabc2f0245..380bdb8ae32 100644
--- a/src/vulkan/wsi/wsi_common_display.c
+++ b/src/vulkan/wsi/wsi_common_display.c
@@ -305,6 +305,9 @@ wsi_display_alloc_connector(struct wsi_display *wsi,
if (!connector)
return NULL;
+ if (!connector)
+ return NULL;
+
connector->id = connector_id;
connector->wsi = wsi;
connector->active = false;