From: Jason Ekstrand Date: Wed, 16 Aug 2017 23:50:46 +0000 (-0700) Subject: ralloc: Allow reparenting to a NULL context X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3d54d03757fcb656cc4839a2c7978d97f75508d;p=mesa.git ralloc: Allow reparenting to a NULL context Reviewed-by: Tapani Pälli Reviewed-by: Ian Romanick Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- diff --git a/src/util/ralloc.c b/src/util/ralloc.c index 9cce9e02f68..42cfa2e391d 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);