renamed arts.{c,h} to polyops.{c,h}
[swftools.git] / lib / devices / ops.c
index e5e19af..cb0c6f1 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
+#ifndef WIN32
 #include <unistd.h>
+#endif
 #include <memory.h>
+#include <string.h>
 #include "../types.h"
 #include "../mem.h"
 #include "../gfxdevice.h"
@@ -157,7 +160,9 @@ void ops_endpage(struct _gfxdevice*dev)
 
 gfxresult_t* ops_finish(struct _gfxdevice*dev)
 {
-    free(dev->internal);dev->internal = 0;
+    if(dev->internal) 
+       free(dev->internal);
+    dev->internal = 0;
     return 0;
 }