X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fdevices%2Fpolyops.c;h=ab9aa8c80cb6651000e559cc21dcac886a4f6634;hp=1a71c1fe896cc83e776c6c6b75fe277ce7339337;hb=85c68ce7c98ce23b0f0512bc1c83ff4be86c3114;hpb=0430a2dbc9e881eb4e0561fdc9e21e0f400ec094 diff --git a/lib/devices/polyops.c b/lib/devices/polyops.c index 1a71c1f..ab9aa8c 100644 --- a/lib/devices/polyops.c +++ b/lib/devices/polyops.c @@ -152,8 +152,8 @@ void polyops_fill(struct _gfxdevice*dev, gfxline_t*line, gfxcolor_t*color) if(i->clip) { gfxpoly_t*old = poly; - poly = gfxpoly_intersect(poly, i->clip->poly); - gfxpoly_free(poly); + poly = gfxpoly_intersect(poly, i->clip->poly); + gfxpoly_free(old); } addtounion(dev,poly); gfxline_t*gfxline = gfxpoly_to_gfxline(poly); @@ -259,6 +259,10 @@ gfxresult_t* polyops_finish(struct _gfxdevice*dev) { dbg("polyops_finish"); internal_t*i = (internal_t*)dev->internal; + + if(i->polyunion) { + gfxpoly_free(i->polyunion);i->polyunion=0; + } if(i->out) { return i->out->finish(i->out); } else {