summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2007-12-18 18:59:49 +0000
committerJosé Fonseca <[email protected]>2008-01-17 12:09:29 +0900
commit39b8303d4af97235b4daeba5a9ee0e12640e0be5 (patch)
tree1a63aa704b89e708a213ed27cc9ab474dc5b0f5c /src
parentaf51d188c3e894c2ac3d261831320f178d1bd6fe (diff)
gallium: Detect if a null buffer is passed.
Diffstat (limited to 'src')
-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 e69f88a323a..dfb80b1dcf4 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;