Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 28601) +++ trunk/src_plugins/export_svg/svg.c (revision 28602) @@ -358,8 +358,10 @@ if (!svg_cam.active) pcb_hid_restore_layer_ons(save_ons); - svg_footer(); - fclose(f); + if (f != NULL) { + svg_footer(); + fclose(f); + } f = NULL; if (pcb_cam_end(&svg_cam) == 0)