Index: toolpath.c =================================================================== --- toolpath.c (revision 12041) +++ toolpath.c (revision 12042) @@ -89,7 +89,7 @@ { int n; for(n = 0; n < grp->len; n++) { - pcb_layer_t *l = pcb_get_layer(grp->lid[n]); + pcb_layer_t *l = pcb_get_layer(PCB->Data, grp->lid[n]); if (l != NULL) sub_layer_all(pcb, result, l, centerline); } @@ -171,7 +171,7 @@ otlbb.X2 = otlbb.Y2 = -PCB_MAX_COORD; for(n = 0; n < og->len; n++) { - pcb_layer_t *l = pcb_get_layer(og->lid[n]); + pcb_layer_t *l = pcb_get_layer(PCB->Data, og->lid[n]); if (l == NULL) continue;