Index: sketch_route.c =================================================================== --- sketch_route.c (revision 28107) +++ sketch_route.c (revision 28108) @@ -1030,9 +1030,9 @@ if (type != PCB_OBJ_VOID) { term_obj = ptr2; if (term_obj->term != NULL - && ((type == PCB_OBJ_PSTK && pcb_pstk_shape_at(PCB, (pcb_pstk_t *) term_obj, CURRENT) != NULL) + && ((type == PCB_OBJ_PSTK && pcb_pstk_shape_at(PCB, (pcb_pstk_t *) term_obj, PCB_CURRLAYER(PCB)) != NULL) || type != PCB_OBJ_PSTK) - && attached_path_init(CURRENT, term_obj)) { + && attached_path_init(PCB_CURRLAYER(PCB), term_obj)) { pcb_crosshair.AttachedObject.Type = PCB_OBJ_LINE; pcb_crosshair.AttachedObject.State = PCB_CH_STATE_SECOND; } @@ -1047,7 +1047,7 @@ if (type != PCB_OBJ_VOID) { term_obj = ptr2; if (term_obj->term != NULL - && ((type == PCB_OBJ_PSTK && pcb_pstk_shape_at(PCB, (pcb_pstk_t *) term_obj, CURRENT) != NULL) + && ((type == PCB_OBJ_PSTK && pcb_pstk_shape_at(PCB, (pcb_pstk_t *) term_obj, PCB_CURRLAYER(PCB)) != NULL) || type != PCB_OBJ_PSTK)) { if (attached_path_finish(term_obj) == pcb_true) { attached_path_uninit();