aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ralloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/ralloc.c')
-rw-r--r--mesalib/src/glsl/ralloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesalib/src/glsl/ralloc.c b/mesalib/src/glsl/ralloc.c
index 2f93dcdea..3da09b559 100644
--- a/mesalib/src/glsl/ralloc.c
+++ b/mesalib/src/glsl/ralloc.c
@@ -278,7 +278,7 @@ ralloc_parent(const void *ptr)
return NULL;
info = get_header(ptr);
- return PTR_FROM_HEADER(info->parent);
+ return info->parent ? PTR_FROM_HEADER(info->parent) : NULL;
}
static void *autofree_context = NULL;