pipebuffer: Ensure buffer size/alignment is not zero.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 14 Jan 2010 15:07:20 +0000 (15:07 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 19 Jan 2010 04:34:19 +0000 (20:34 -0800)
src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c

index 6e3214ca9c9b4de60c596792f49c056e03b24d52..8f74180a111b90016c66ad31662e10d870e730f7 100644 (file)
@@ -371,6 +371,9 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
    struct pb_desc real_desc;
    pb_size real_size;
    
+   assert(size);
+   assert(desc->alignment);
+
    buf = CALLOC_STRUCT(pb_debug_buffer);
    if(!buf)
       return NULL;