From: kramm Date: Tue, 30 Dec 2008 22:55:30 +0000 (+0000) Subject: fixed code_cutlast if there's only one opcode X-Git-Tag: release-0-9-0~560 X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;h=0d9aa72da3824e773f550cf9240690217ff46fa9;hp=9a8562f4432e2c2d4740cb68161e4e71d1975164;p=swftools.git fixed code_cutlast if there's only one opcode --- diff --git a/lib/as3/code.c b/lib/as3/code.c index 37339e5..628f4d8 100644 --- a/lib/as3/code.c +++ b/lib/as3/code.c @@ -1103,10 +1103,12 @@ code_t*code_dup(code_t*c) code_t*code_cutlast(code_t*c) { + if(!c) return c; assert(!c->next); code_t*prev = c->prev; c->prev = 0; - prev->next=0; + if(prev) + prev->next=0; code_free(c); return prev; }