[Mesa-dev] [PATCH 18/21] ralloc: Allow reparenting to a NULL context

Jason Ekstrand jason at jlekstrand.net
Fri Sep 29 21:25:18 UTC 2017


Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Ian Romanick <idr at freedesktop.org>
---
 src/util/ralloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/ralloc.c b/src/util/ralloc.c
index 9cce9e0..42cfa2e 100644
--- a/src/util/ralloc.c
+++ b/src/util/ralloc.c
@@ -285,7 +285,7 @@ ralloc_steal(const void *new_ctx, void *ptr)
       return;
 
    info = get_header(ptr);
-   parent = get_header(new_ctx);
+   parent = new_ctx ? get_header(new_ctx) : NULL;
 
    unlink_block(info);
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list