Gerbview: Fix a crash Don't try to close an empty polygon on G37 command.
Can happens with malformed Gerber files.
From Master, commit 528ebf8
.
This commit is contained in:
parent
d871a92d1c
commit
97dea6ede5
|
@ -554,7 +554,10 @@ bool GERBER_FILE_IMAGE::Execute_G_Command( char*& text, int G_command )
|
|||
if( m_Exposure && GetItemsList() ) // End of polygon
|
||||
{
|
||||
GERBER_DRAW_ITEM * gbritem = m_Drawings.GetLast();
|
||||
gbritem->m_Polygon.Append( gbritem->m_Polygon.Vertex( 0 ) );
|
||||
|
||||
if( gbritem->m_Polygon.VertexCount() )
|
||||
gbritem->m_Polygon.Append( gbritem->m_Polygon.Vertex( 0 ) );
|
||||
|
||||
StepAndRepeatItem( *gbritem );
|
||||
}
|
||||
m_Exposure = false;
|
||||
|
|
Loading…
Reference in New Issue