mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-05-06 06:47:23 -04:00
render/vulkan: destroy image view on allocation failure
This commit is contained in:
parent
b808144b7b
commit
70d99eefef
1 changed files with 1 additions and 0 deletions
|
|
@ -330,6 +330,7 @@ struct wlr_vk_texture_view *vulkan_texture_get_or_create_view(struct wlr_vk_text
|
|||
|
||||
view->ds_pool = vulkan_alloc_texture_ds(texture->renderer, pipeline_layout->ds, &view->ds);
|
||||
if (!view->ds_pool) {
|
||||
vkDestroyImageView(dev, view->image_view, NULL);
|
||||
free(view);
|
||||
wlr_log(WLR_ERROR, "failed to allocate descriptor");
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue