Index: net_len.c =================================================================== --- net_len.c (revision 34992) +++ net_len.c (revision 34993) @@ -579,7 +579,7 @@ } /* make sure junctions are ordered the same way as the object array */ - if (ctx.seglen->junc_at[0] != ctx.seglen->objs.array[0]) { + if ((ctx.seglen->objs.used > 0) && (ctx.seglen->junc_at[0] != ctx.seglen->objs.array[0])) { rnd_swap(pcb_any_obj_t *, ctx.seglen->junc_at[0], ctx.seglen->junc_at[1]); rnd_swap(pcb_any_obj_t *, ctx.seglen->junction[0], ctx.seglen->junction[1]); }