From 2568c168a24c89df4b72c34b3a03ee031b099e88 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 9 May 2020 00:52:57 +0100 Subject: [PATCH] Silence Coverity warning. --- pcbnew/drc/drc.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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();