diff options
-rw-r--r-- | src/gallium/auxiliary/util/u_transfer_helper.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_transfer_helper.c b/src/gallium/auxiliary/util/u_transfer_helper.c index dd31049920f..3b085fd99f0 100644 --- a/src/gallium/auxiliary/util/u_transfer_helper.c +++ b/src/gallium/auxiliary/util/u_transfer_helper.c @@ -138,8 +138,7 @@ u_transfer_helper_resource_destroy(struct pipe_screen *pscreen, if (helper->vtbl->get_stencil) { struct pipe_resource *stencil = helper->vtbl->get_stencil(prsc); - if (stencil) - helper->vtbl->resource_destroy(pscreen, stencil); + pipe_resource_reference(&stencil, NULL); } helper->vtbl->resource_destroy(pscreen, prsc); |