X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswftext.c;h=b1a108065215d721f90ad91ca33bc48997d8e3f4;hb=a0c23e11cb8ea79e4fabd9d491d1716412746df4;hp=d5154569866ababe8a47f539a3903ac8adaa7807;hpb=b26c89921b0f8996e48a34f92aafe07a7cbd6cd0;p=swftools.git diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index d515456..b1a1080 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -575,8 +575,10 @@ static void font_freeglyphnames(SWFFONT*f) if (f->glyphnames) { int t; for (t = 0; t < f->numchars; t++) { - if (f->glyphnames[t]) + if (f->glyphnames[t]) { rfx_free(f->glyphnames[t]); + f->glyphnames[t] = 0; + } } rfx_free(f->glyphnames); f->glyphnames = 0; @@ -657,6 +659,9 @@ int swf_FontReduce(SWFFONT * f) int max_glyph = 0; if ((!f) || (!f->use) || f->use->is_reduced) return -1; + + font_freelayout(f); + font_freeglyphnames(f); for (i = 0; i < f->numchars; i++) { if(!f->use->chars[i]) { @@ -679,8 +684,6 @@ int swf_FontReduce(SWFFONT * f) } f->maxascii = max_unicode; f->numchars = max_glyph; - font_freelayout(f); - font_freeglyphnames(f); font_freename(f); return 0; }