panvk: Add missing null check in DestroyCommandPool
Fix a crash when a null handle is passed.
(dEQP-VK.api.null_handle.destroy_command_pool)
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: afbac1af77
("panvk: Move the VkCommandPool logic to panvk_cmd_pool.{c,h}")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29783>
This commit is contained in:
@@ -51,6 +51,9 @@ panvk_DestroyCommandPool(VkDevice _device, VkCommandPool commandPool,
|
|||||||
VK_FROM_HANDLE(panvk_device, device, _device);
|
VK_FROM_HANDLE(panvk_device, device, _device);
|
||||||
VK_FROM_HANDLE(panvk_cmd_pool, pool, commandPool);
|
VK_FROM_HANDLE(panvk_cmd_pool, pool, commandPool);
|
||||||
|
|
||||||
|
if (!pool)
|
||||||
|
return;
|
||||||
|
|
||||||
vk_command_pool_finish(&pool->vk);
|
vk_command_pool_finish(&pool->vk);
|
||||||
|
|
||||||
panvk_bo_pool_cleanup(&pool->desc_bo_pool);
|
panvk_bo_pool_cleanup(&pool->desc_bo_pool);
|
||||||
|
Reference in New Issue
Block a user