From 39b8303d4af97235b4daeba5a9ee0e12640e0be5 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 18 Dec 2007 18:59:49 +0000 Subject: gallium: Detect if a null buffer is passed. --- src/mesa/pipe/pipebuffer/pb_buffer_fenced.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/pipe') 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; -- cgit v1.2.3