From bd00fb2c060d3d90be670a2f0bbd6f9c9fd2b4ae Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 31 May 2011 13:33:34 +0100 Subject: svga: Handle null buffers in svga_buffer_is_user_buffer(). --- src/gallium/drivers/svga/svga_resource_buffer.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/svga') diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h index 2ae44d2a5e9..69d6f72a11c 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer.h +++ b/src/gallium/drivers/svga/svga_resource_buffer.h @@ -200,7 +200,11 @@ svga_buffer(struct pipe_resource *buffer) static INLINE boolean svga_buffer_is_user_buffer( struct pipe_resource *buffer ) { - return svga_buffer(buffer)->user; + if (buffer) { + return svga_buffer(buffer)->user; + } else { + return FALSE; + } } -- cgit v1.2.3