Index: gerber.c =================================================================== --- gerber.c (revision 37320) +++ 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