[Mesa-dev] [PATCH 1/9] ralloc: Allow reparenting to a NULL context

Jason Ekstrand jason at jlekstrand.net
Thu Aug 17 17:22:15 UTC 2017


---
 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 bf46439..4015c7e 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