panvk: Add check for null fence

Signed-off-by: Manas Chaudhary <manas.chaudhary@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14108>
This commit is contained in:
Manas Chaudhary 2021-12-07 19:16:08 +05:30 committed by Marge Bot
parent c749da6135
commit def254b05f
1 changed files with 3 additions and 0 deletions

View File

@ -238,6 +238,9 @@ panvk_DestroyFence(VkDevice _device, VkFence _fence,
VK_FROM_HANDLE(panvk_device, device, _device);
VK_FROM_HANDLE(panvk_fence, fence, _fence);
if (!fence)
return;
sync_destroy(device, &fence->syncobj);
vk_object_free(&device->vk, pAllocator, fence);
}