diff options
Diffstat (limited to 'src/svg/cdsvg.c')
-rw-r--r-- | src/svg/cdsvg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/svg/cdsvg.c b/src/svg/cdsvg.c index b84fb48..bfde533 100644 --- a/src/svg/cdsvg.c +++ b/src/svg/cdsvg.c @@ -58,12 +58,6 @@ static void cdtransform(cdCtxCanvas *ctxcanvas, const double* matrix); static void cdkillcanvas(cdCtxCanvas* ctxcanvas) { - if (ctxcanvas->old_locale) - { - setlocale(LC_NUMERIC, ctxcanvas->old_locale); - free(ctxcanvas->old_locale); - } - if (ctxcanvas->clip_control) fprintf(ctxcanvas->file, "</g>\n"); /* close clipping container */ @@ -75,6 +69,12 @@ static void cdkillcanvas(cdCtxCanvas* ctxcanvas) fclose(ctxcanvas->file); + if (ctxcanvas->old_locale) + { + setlocale(LC_NUMERIC, ctxcanvas->old_locale); + free(ctxcanvas->old_locale); + } + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); free(ctxcanvas); } |