mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01:00
vk: Only finish wayland wsi if we created it
Failure during instance creation will leave instance->wayland_wsi undefined. When we then try to clean that up we crash. Set instance->wayland_wsi to NULL on failure and only clean it up if it's non-NULL. Fixes part of dEQP-VK.api.object_management.alloc_callback_fail.*
This commit is contained in:
parent
05c22f2d74
commit
75e01c8b2d
1 changed files with 5 additions and 3 deletions
|
|
@ -862,9 +862,11 @@ anv_wl_finish_wsi(struct anv_instance *instance)
|
|||
{
|
||||
struct wsi_wayland *wsi = instance->wayland_wsi;
|
||||
|
||||
_mesa_hash_table_destroy(wsi->displays, NULL);
|
||||
if (wsi) {
|
||||
_mesa_hash_table_destroy(wsi->displays, NULL);
|
||||
|
||||
pthread_mutex_destroy(&wsi->mutex);
|
||||
pthread_mutex_destroy(&wsi->mutex);
|
||||
|
||||
anv_free(&instance->alloc, wsi);
|
||||
anv_free(&instance->alloc, wsi);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue