X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Frecord.c;h=a8a0088672b5ea848c97cc726d857c3204b00077;hb=bf04757cd94e94c1f67fa3d2a4e3e59fa5bce0c0;hp=5ea7d1b98ca690204e612ed6fb2d61d83d08c7bc;hpb=31dbdcebf78cfaa7c2dd5bb025689d48960acb46;p=swftools.git diff --git a/lib/devices/record.c b/lib/devices/record.c index 5ea7d1b..a8a0088 100644 --- a/lib/devices/record.c +++ b/lib/devices/record.c @@ -348,7 +348,7 @@ static void record_fillgradient(struct _gfxdevice*dev, gfxline_t*line, gfxgradie static void record_addfont(struct _gfxdevice*dev, gfxfont_t*font) { internal_t*i = (internal_t*)dev->internal; - msg(" record: %08x ADDFONT %s\n", dev); + msg(" record: %08x ADDFONT %s\n", dev, font->id); if(font && !gfxfontlist_hasfont(i->fontlist, font)) { writer_writeU8(&i->w, OP_ADDFONT); dumpFont(&i->w, font); @@ -549,7 +549,11 @@ static void replay(struct _gfxdevice*dev, gfxdevice_t*out, void*data, int length } finish: r->dealloc(r); - gfxfontlist_free(fontlist, 1); + /* problem: if we just replayed into a device which stores the + font for later use (the record device itself is a nice example), + then we can't free it yet */ + //gfxfontlist_free(fontlist, 1); + gfxfontlist_free(fontlist, 0); } void gfxresult_record_replay(gfxresult_t*result, gfxdevice_t*device) {