nvk: Don't destroy NULL descriptor pool BOs
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:11:55 +0000 (20:11 -0600)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:58 +0000 (21:31 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/vulkan/nvk_descriptor_set.c

index f5e138a..4b5366d 100644 (file)
@@ -249,7 +249,8 @@ nvk_destroy_descriptor_pool(struct nvk_device *device, const VkAllocationCallbac
       nvk_descriptor_set_destroy(device, pool, pool->entries[i].set, false);
    }
 
-   nouveau_ws_bo_destroy(pool->bo);
+   if (pool->bo)
+      nouveau_ws_bo_destroy(pool->bo);
 
    vk_object_base_finish(&pool->base);
    vk_free2(&device->vk.alloc, pAllocator, pool);