summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/glsl/ralloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ralloc.c b/src/glsl/ralloc.c
index 2f93dcdeaf..3da09b5592 100644
--- a/src/glsl/ralloc.c
+++ b/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;