avutil/hwcontext_vulkan: check if created before destroying the device

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
pull/375/head
Wu Jianhua 3 years ago committed by Lynne
parent 9dd104f6e2
commit c2a356d583
  1. 3
      libavutil/hwcontext_vulkan.c

@ -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…
Cancel
Save