From: Wolfgang Bumiller Date: Wed, 4 Jul 2012 11:16:15 +0000 (+0200) Subject: Don't die on functions with no variables X-Git-Tag: 0.1-rc1~457 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7245b675b2e4541f9fd7c9b3cb983c7d7b831c48;p=xonotic%2Fgmqcc.git Don't die on functions with no variables --- diff --git a/ir.c b/ir.c index eeb55ce..557a821 100644 --- a/ir.c +++ b/ir.c @@ -1663,6 +1663,9 @@ bool ir_function_allocate_locals(ir_function *self) function_allocator alloc; + if (!self->locals_count) + return true; + MEM_VECTOR_INIT(&alloc, locals); MEM_VECTOR_INIT(&alloc, sizes); MEM_VECTOR_INIT(&alloc, positions);