By the Vulkan specification, and similarly to many other Vulkan calls,
it is allowed to destroy a null descriptor update template.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Fixes: af5f13e58c9dfe ("anv: add VK_KHR_descriptor_update_template support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9005>
ANV_FROM_HANDLE(anv_descriptor_update_template, template,
descriptorUpdateTemplate);
+ if (!template)
+ return;
+
vk_object_base_finish(&template->base);
vk_free2(&device->vk.alloc, pAllocator, template);
}