Module: Mesa
Branch: master
Commit: ee2aef3ea531a03dbd50a78c943ca6e7cc99c7a7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee2aef3ea531a03dbd50a78c943ca6e7cc99c7a7

Author: Tapani Pälli <[email protected]>
Date:   Thu May  7 09:24:44 2020 +0300

anv: call base finish only if pass given in DestroyRenderPass

Fixes: 682c81bdfb7 ("vulkan,anv: Add a base object struct type")
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4936>

---

 src/intel/vulkan/anv_pass.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c
index 3820cbfe5dd..49ad6043573 100644
--- a/src/intel/vulkan/anv_pass.c
+++ b/src/intel/vulkan/anv_pass.c
@@ -593,6 +593,9 @@ void anv_DestroyRenderPass(
    ANV_FROM_HANDLE(anv_device, device, _device);
    ANV_FROM_HANDLE(anv_render_pass, pass, _pass);
 
+   if (!pass)
+      return;
+
    vk_object_base_finish(&pass->base);
    vk_free2(&device->vk.alloc, pAllocator, pass);
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to