X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fdevices%2Fpolyops.c;fp=lib%2Fdevices%2Fpolyops.c;h=416797c9eec59aba01cd5007519c20d8008dad47;hp=e6dd671525a46a9958b052913dbb99edbdb2f73a;hb=cfb7bd544f259200542b74152ff919595a9da86c;hpb=0c8078b9fa9e2273e4dee6356beccbc35a592a26 diff --git a/lib/devices/polyops.c b/lib/devices/polyops.c index e6dd671..416797c 100644 --- a/lib/devices/polyops.c +++ b/lib/devices/polyops.c @@ -325,6 +325,7 @@ void polyops_drawchar(struct _gfxdevice*dev, gfxfont_t*font, int glyphnr, gfxcol } else { if(i->out) i->out->drawchar(i->out, font, glyphnr, color, matrix); } + gfxline_free(gfxline); } else { if(i->out) i->out->drawchar(i->out, font, glyphnr, color, matrix); } @@ -351,7 +352,6 @@ gfxresult_t* polyops_finish(struct _gfxdevice*dev) dbg("polyops_finish"); internal_t*i = (internal_t*)dev->internal; - if(i->polyunion) { gfxpoly_destroy(i->polyunion);i->polyunion=0; } else { @@ -359,8 +359,10 @@ gfxresult_t* polyops_finish(struct _gfxdevice*dev) msg(" --flatten success rate: %.1f%% (%d failed polygons)", i->good_polygons*100.0 / (i->good_polygons + i->bad_polygons), i->bad_polygons); } } - if(i->out) { - return i->out->finish(i->out); + gfxdevice_t*out = i->out; + free(i);memset(dev, 0, sizeof(gfxdevice_t)); + if(out) { + return out->finish(out); } else { return 0; }