don't crash on zero abc_file during writing
authorMatthias Kramm <kramm@quiss.org>
Fri, 13 Feb 2009 14:56:26 +0000 (15:56 +0100)
committerMatthias Kramm <kramm@quiss.org>
Fri, 13 Feb 2009 14:56:26 +0000 (15:56 +0100)
lib/as3/abc.c

index 30e5616..60ad6e7 100644 (file)
@@ -933,6 +933,8 @@ static pool_t*writeABC(TAG*abctag, void*code, pool_t*pool)
     abc_file_t*file = (abc_file_t*)code;
     if(!pool) 
         pool = pool_new();
+    if(!file)
+        file = abc_file_new();
 
     TAG*tmp = swf_InsertTag(0,0);
     TAG*tag = tmp;