summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/brw_ir_allocator.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_ir_allocator.h b/src/intel/compiler/brw_ir_allocator.h
index b1237ed38e7..9f124645ba2 100644
--- a/src/intel/compiler/brw_ir_allocator.h
+++ b/src/intel/compiler/brw_ir_allocator.h
@@ -47,6 +47,7 @@ namespace brw {
unsigned
allocate(unsigned size)
{
+ assert(size > 0);
if (capacity <= count) {
capacity = MAX2(16, capacity * 2);
sizes = (unsigned *)realloc(sizes, capacity * sizeof(unsigned));