From 53b6993d2bbfbf8aa3d5d0c922a4cc6a01a201d0 Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Fri, 30 Dec 2022 22:31:05 +0000
Subject: [PATCH] Don't report errors in first pass of board outline
 generation.

Segments which aren't used to build holes in footprints can still
be used by the second pass to build the board outline.

Fixes https://gitlab.com/kicad/code/kicad/issues/13321
---
 pcbnew/convert_shape_list_to_polygon.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pcbnew/convert_shape_list_to_polygon.cpp b/pcbnew/convert_shape_list_to_polygon.cpp
index da8a0931d8..4ac30a086e 100644
--- a/pcbnew/convert_shape_list_to_polygon.cpp
+++ b/pcbnew/convert_shape_list_to_polygon.cpp
@@ -634,7 +634,10 @@ bool BuildBoardPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, int aE
         {
             SHAPE_POLY_SET fpOutlines;
             success = ConvertOutlineToPolygon( fpSegList, fpOutlines, aErrorMax, aChainingEpsilon,
-                                               false, aErrorHandler );
+                                               false,
+                                               // don't report errors here; the second pass also
+                                               // gets an opportunity to use these segments
+                                               nullptr );
 
             if( success && isCopperOutside( fp, fpOutlines ) )
             {