diff --git a/pcbnew/drc/drc.cpp b/pcbnew/drc/drc.cpp index 0ce3b2eb69..cebb5172b0 100644 --- a/pcbnew/drc/drc.cpp +++ b/pcbnew/drc/drc.cpp @@ -1038,10 +1038,13 @@ void DRC::testKeepoutAreas() // Fast test to detect a footprint inside the keepout area bounding box. if( areaBBox.Intersects( fp->GetBoundingBox() ) ) { - fp->BuildPolyCourtyard(); + SHAPE_POLY_SET outline; - SHAPE_POLY_SET outline = fp->IsFlipped() ? fp->GetPolyCourtyardBack() - : fp->GetPolyCourtyardFront(); + if( fp->BuildPolyCourtyard() ) + { + outline = fp->IsFlipped() ? fp->GetPolyCourtyardBack() + : fp->GetPolyCourtyardFront(); + } if( outline.OutlineCount() == 0 ) outline = fp->GetBoundingPoly();