merged in fontalignzones branch
[swftools.git] / lib / modules / swfaction.c
index 9a44798..fb7474d 100644 (file)
@@ -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;
 }