mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 12:28:07 +02:00
vulkan/wsi/x11: Better handle wsi_x11_connection_create failure
Without this fix, the function would still end up returning NULL but it would put that NULL connection in the hash table which would be bad. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
e3e5b1a488
commit
fc0e9e3e40
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue