Don't crash on empty pcad polygons
Fixes sentry KICAD-103
This commit is contained in:
parent
1f34883a27
commit
fb1cc72013
|
@ -94,6 +94,12 @@ bool PCB_COPPER_POUR::Parse( XNODE* aNode, const wxString& aDefaultUnits,
|
||||||
// retrieve copper pour outline
|
// retrieve copper pour outline
|
||||||
FormPolygon( lNode, &m_outline, aDefaultUnits, aActualConversion );
|
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_positionX = m_outline[0]->x;
|
||||||
m_positionY = m_outline[0]->y;
|
m_positionY = m_outline[0]->y;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue