From: Wolfgang (Blub) Bumiller Date: Fri, 24 Aug 2012 16:03:57 +0000 (+0200) Subject: ir: don't require a label on a block X-Git-Tag: 0.1-rc1~49 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2524d9c31b624535ac5085f2ae1871a5855912f0;p=xonotic%2Fgmqcc.git ir: don't require a label on a block --- diff --git a/ir.c b/ir.c index 0be4d05..0162e8e 100644 --- a/ir.c +++ b/ir.c @@ -462,7 +462,7 @@ ir_block* ir_block_new(ir_function* owner, const char *name) memset(self, 0, sizeof(*self)); self->label = NULL; - if (!ir_block_set_label(self, name)) { + if (name && !ir_block_set_label(self, name)) { mem_d(self); return NULL; } @@ -491,7 +491,7 @@ MEM_VEC_FUNCTIONS_ALL(ir_block, ir_value*, living) void ir_block_delete(ir_block* self) { size_t i; - mem_d(self->label); + if (self->label) mem_d(self->label); for (i = 0; i != self->instr_count; ++i) ir_instr_delete(self->instr[i]); MEM_VECTOR_CLEAR(self, instr);