mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 03:50:36 +00:00
functions which have no living values but store_return values may cause the allocator to be run with no allocations being made - in this case we shouldn't try accessing the empty array and simply exit the allocator
This commit is contained in:
parent
4254845227
commit
14210a62ef
1 changed files with 4 additions and 0 deletions
4
ir.c
4
ir.c
|
@ -1894,6 +1894,10 @@ bool ir_function_allocate_locals(ir_function *self)
|
|||
}
|
||||
}
|
||||
|
||||
if (!alloc.sizes) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Adjust slot positions based on sizes */
|
||||
if (!function_allocator_positions_add(&alloc, 0))
|
||||
goto error;
|
||||
|
|
Loading…
Reference in a new issue