From: José Fonseca Date: Tue, 18 Dec 2007 18:59:49 +0000 (+0000) Subject: gallium: Detect if a null buffer is passed. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39b8303d4af97235b4daeba5a9ee0e12640e0be5;p=mesa.git gallium: Detect if a null buffer is passed. --- 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;