pipebuffer: fix inverted signalled checking
[mesa.git] / src / gallium / auxiliary / pipebuffer / pb_buffer_malloc.c
index 0760d607161514e29a8174da869638edd2333691..6bdce5fcb060b355ec8115686c809fb77019641e 100644 (file)
@@ -53,6 +53,8 @@ static INLINE struct malloc_buffer *
 malloc_buffer(struct pb_buffer *buf)
 {
    assert(buf);
+   if (!buf)
+      return NULL;
    assert(buf->vtbl == &malloc_buffer_vtbl);
    return (struct malloc_buffer *)buf;
 }