vulkan/wsi/display: do not dereference a NULL pointer
authorIván Briano <ivan.briano@intel.com>
Mon, 10 Oct 2022 21:45:58 +0000 (14:45 -0700)
committerMarge Bot <emma+marge@anholt.net>
Mon, 3 Apr 2023 20:21:17 +0000 (20:21 +0000)
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>

src/vulkan/wsi/wsi_common_display.c

index ddabc2f..380bdb8 100644 (file)
@@ -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;