Index: polygon.c =================================================================== --- polygon.c (revision 28094) +++ polygon.c (revision 28095) @@ -1426,7 +1426,7 @@ if (Data->parent_type != PCB_PARENT_BOARD) return 0; if (ptr1 == NULL) { /* no layer specified: run on all layers */ - LAYER_LOOP(Data, pcb_max_layer); + LAYER_LOOP(Data, pcb_max_layer(PCB)); { if (!(pcb_layer_flags_(layer) & PCB_LYT_COPPER)) continue;