gallium: Detect if a null buffer is passed.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 18 Dec 2007 18:59:49 +0000 (18:59 +0000)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 17 Jan 2008 03:09:29 +0000 (12:09 +0900)
src/mesa/pipe/pipebuffer/pb_buffer_fenced.c

index e69f88a323a87d81b606499d71a90a69078e1b2d..dfb80b1dcf4129c1ee0c9516fd4cb234633d429b 100644 (file)
@@ -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;