aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/ralloc.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2017-08-16 16:50:46 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2017-10-12 22:39:31 -0700
commitc3d54d03757fcb656cc4839a2c7978d97f75508d (patch)
tree0007c07c75c8004d318be4fa998e666332e5cca5 /src/util/ralloc.c
parent2e317a4b6d77ab078bdc9b21765f6051c4577c5e (diff)
downloadexternal_mesa3d-c3d54d03757fcb656cc4839a2c7978d97f75508d.tar.gz
external_mesa3d-c3d54d03757fcb656cc4839a2c7978d97f75508d.tar.bz2
external_mesa3d-c3d54d03757fcb656cc4839a2c7978d97f75508d.zip
ralloc: Allow reparenting to a NULL context
Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Ian Romanick <idr@freedesktop.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/util/ralloc.c')
-rw-r--r--src/util/ralloc.c2
1 files changed, 1 insertions, 1 deletions
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);