#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"
gfxresult_t* ops_finish(struct _gfxdevice*dev)
{
- free(dev->internal);dev->internal = 0;
+ if(dev->internal)
+ free(dev->internal);
+ dev->internal = 0;
return 0;
}