summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/pipe/pipebuffer/pb_buffer_fenced.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c b/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c
index e69f88a323..dfb80b1dcf 100644
--- a/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c
+++ b/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c
@@ -230,6 +230,9 @@ fenced_buffer_create(struct fenced_buffer_list *fenced_list,
{
struct fenced_buffer *buf;
+ if(!buffer)
+ return NULL;
+
buf = (struct fenced_buffer *)calloc(1, sizeof(struct fenced_buffer));
if(!buf)
return NULL;