diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index a6463de622..00df08b55e 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -350,7 +350,7 @@ void ff_vk_free_buf(FFVulkanContext *s, FFVkBuffer *buf) { FFVulkanFunctions *vk = &s->vkfn; - if (!buf) + if (!buf || !s->hwctx) return; vk->DeviceWaitIdle(s->hwctx->act_dev);