Index: trunk/src/obj_padstack_op.c =================================================================== --- trunk/src/obj_padstack_op.c (revision 12463) +++ trunk/src/obj_padstack_op.c (revision 12464) @@ -140,7 +140,7 @@ void *pcb_padstackop_change_thermal(pcb_opctx_t *ctx, pcb_padstack_t *ps) { pcb_board_t *pcb = ctx->chgtherm.pcb; - pcb_layer_t *layer = pcb_get_layer(pcb, ctx->chgtherm.lid); + pcb_layer_t *layer = pcb_get_layer(pcb->Data, ctx->chgtherm.lid); pcb_undo_add_obj_to_clear_poly(PCB_TYPE_PADSTACK, ps, ps, ps, pcb_false); pcb_poly_restore_to_poly(pcb->Data, PCB_TYPE_PADSTACK, layer, ps);