mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avutil/hwcontext_vulkan: check if created before destroying the device
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
This commit is contained in:
parent
9dd104f6e2
commit
c2a356d583
@ -1150,7 +1150,8 @@ static void vulkan_device_free(AVHWDeviceContext *ctx)
|
||||
FFVulkanFunctions *vk = &p->vkfn;
|
||||
AVVulkanDeviceContext *hwctx = ctx->hwctx;
|
||||
|
||||
vk->DestroyDevice(hwctx->act_dev, hwctx->alloc);
|
||||
if (hwctx->act_dev)
|
||||
vk->DestroyDevice(hwctx->act_dev, hwctx->alloc);
|
||||
|
||||
if (p->debug_ctx)
|
||||
vk->DestroyDebugUtilsMessengerEXT(hwctx->inst, p->debug_ctx,
|
||||
|
Loading…
Reference in New Issue
Block a user