fixed a potential segfault
[swftools.git] / src / swfc.c
index 377b531..2db2d10 100644 (file)
@@ -923,7 +923,7 @@ static void writeInstance(instance_t* i)
     while (frame < currentframe)
     {
         frame++;
-        while (tag->id != ST_SHOWFRAME)
+        while (tag && tag->id != ST_SHOWFRAME)
             tag = tag->next;
         if (parametersChange(i->history, frame))
         {