Index: pstk_compat.c =================================================================== --- pstk_compat.c (revision 15086) +++ pstk_compat.c (revision 15087) @@ -131,11 +131,13 @@ memset(&copper_master, 0, sizeof(copper_master)); memset(&mask_master, 0, sizeof(mask_master)); - tshp.len = 3 + (mask > 0 ? 2 : 0); tshp.shape = shape; proto.tr.alloced = proto.tr.used = 1; /* has the canonical form only */ proto.tr.array = &tshp; + if (plated) { + tshp.len = 3 + (mask > 0 ? 2 : 0); + /* we need to generate the shape only once as it's the same on all */ if (compat_via_shape_gen(&copper_master, cshape, pad_dia) != 0) return NULL; @@ -155,6 +157,9 @@ shape[3].layer_mask = PCB_LYT_MASK | PCB_LYT_TOP; shape[3].comb = PCB_LYC_SUB + PCB_LYC_AUTO; shape[4].layer_mask = PCB_LYT_MASK | PCB_LYT_BOTTOM; shape[4].comb = PCB_LYC_SUB + PCB_LYC_AUTO; } + } + else + tshp.len = 0; proto.hdia = drill_dia; proto.hplated = plated;