Index: export_gerber/gerber.c =================================================================== --- export_gerber/gerber.c (revision 37320) +++ export_gerber/gerber.c (revision 37321) @@ -449,7 +449,7 @@ if (!all_layers) { int stay = 0; - if ((group >= 0) && pcb_layergrp_is_empty(PCB, group) && !(flags & PCB_LYT_SILK)) { + if ((group >= 0) && pcb_cam_layergrp_is_empty(&gerber_cam, PCB, group) && !(flags & PCB_LYT_SILK)) { /* layer is empty and the user didn't want to have empty layers; however; if the user wants to copy the outline to specific layers, those layers will become non-empty: even an empty outline would bring Index: export_ps/eps.c =================================================================== --- export_ps/eps.c (revision 37320) +++ export_ps/eps.c (revision 37321) @@ -332,7 +332,7 @@ if (PCB_LAYER_IS_ASSY(flags, purpi) || PCB_LAYER_IS_FAB(flags, purpi) || PCB_LAYER_IS_CSECT(flags, purpi) || (flags & PCB_LYT_INVIS)) return 0; - if ((group >= 0) && pcb_layergrp_is_empty(PCB, group) && PCB_LAYER_IS_ROUTE(flags, purpi)) + if ((group >= 0) && pcb_cam_layergrp_is_empty(&eps_cam, PCB, group) && PCB_LAYER_IS_ROUTE(flags, purpi)) return 0; } Index: export_ps/ps.c =================================================================== --- export_ps/ps.c (revision 37320) +++ export_ps/ps.c (revision 37321) @@ -526,7 +526,7 @@ if (is_empty) return 0; - if ((group >= 0) && pcb_layergrp_is_empty(PCB, group)) + if ((group >= 0) && pcb_cam_layergrp_is_empty(&ps_cam, PCB, group)) return 0; }