diff --git a/pcbnew/plugins/pcad/pcad_copper_pour.cpp b/pcbnew/plugins/pcad/pcad_copper_pour.cpp index f95b47e7cc..66cd7f2aaa 100644 --- a/pcbnew/plugins/pcad/pcad_copper_pour.cpp +++ b/pcbnew/plugins/pcad/pcad_copper_pour.cpp @@ -94,6 +94,12 @@ bool PCAD_COPPER_POUR::Parse( XNODE* aNode, const wxString& aDefaultUnits, // retrieve copper pour outline FormPolygon( lNode, &m_Outline, aDefaultUnits, aActualConversion ); + if( m_Outline.GetCount() <= 0 ) + { + // empty polygon may have been in the file + return false; + } + m_PositionX = m_Outline[0]->x; m_PositionY = m_Outline[0]->y; }