diff options
author | José Fonseca <[email protected]> | 2011-05-31 13:33:34 +0100 |
---|---|---|
committer | Thomas Hellstrom <[email protected]> | 2011-07-01 13:30:38 +0200 |
commit | bd00fb2c060d3d90be670a2f0bbd6f9c9fd2b4ae (patch) | |
tree | 9d1d3675fd80a79f327b0fd31faf2965ad0b2152 /src/gallium/drivers/svga | |
parent | 2b301df4aa00cbf4f88c716bda292d0c7126ff95 (diff) |
svga: Handle null buffers in svga_buffer_is_user_buffer().
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_resource_buffer.h | 6 |
1 files changed, 5 insertions, 1 deletions
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; + } } |