summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_pipeline_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan/anv_pipeline_cache.c')
-rw-r--r--src/intel/vulkan/anv_pipeline_cache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c
index ff6e651..ddd51db 100644
--- a/src/intel/vulkan/anv_pipeline_cache.c
+++ b/src/intel/vulkan/anv_pipeline_cache.c
@@ -454,6 +454,9 @@ void anv_DestroyPipelineCache(
ANV_FROM_HANDLE(anv_device, device, _device);
ANV_FROM_HANDLE(anv_pipeline_cache, cache, _cache);
+ if (!cache)
+ return;
+
anv_pipeline_cache_finish(cache);
vk_free2(&device->alloc, pAllocator, cache);