X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfaction.c;h=fb7474d130df4f1b3253380044bfd486d4cd5239;hb=275179c87d277416cfcc0d7a346ed60c4545ba31;hp=9a447989b58e44a4a661478ddc229060b3114fa2;hpb=6c3ab5574d31504d24710c2756899d49275c1a37;p=swftools.git diff --git a/lib/modules/swfaction.c b/lib/modules/swfaction.c index 9a44798..fb7474d 100644 --- a/lib/modules/swfaction.c +++ b/lib/modules/swfaction.c @@ -182,7 +182,6 @@ ActionTAG* swf_ActionGet(TAG*tag) void swf_ActionFree(ActionTAG*action) { if(!action) { - fprintf(stderr, "Warning: freeing zero action"); return; } action = action->parent; @@ -208,6 +207,9 @@ void swf_ActionFree(ActionTAG*action) void swf_ActionSet(TAG*tag, ActionTAG*action) { + if(!action) { + return; + } action=action->parent; while(action) { @@ -969,7 +971,7 @@ ActionTAG* action_WaitForFrame(ActionTAG*atag, U16 frame, U8 skip) *(U8*)&atag->tmp[2] = skip; return atag; } -ActionTAG* action_SetTarget(ActionTAG*atag, char* target) +ActionTAG* action_SetTarget(ActionTAG*atag, const char* target) { char*ptr = strdup(target); return swf_AddActionTAG(atag, ACTION_SETTARGET, (U8*)ptr, strlen(ptr)+1); @@ -1102,7 +1104,7 @@ ActionTAG* swf_ActionCompile(const char* source, int version) rfx_free(buffer); a = swf_ActionGet(tag); - swf_DeleteTag(tag); + swf_DeleteTag(0, tag); return a; }