router: check type before static_cast-ing

This commit is contained in:
Tomasz Włostowski 2018-02-09 13:00:57 +01:00
parent 15f1300221
commit bc7ca08f07
1 changed files with 4 additions and 1 deletions

View File

@ -912,7 +912,10 @@ void PNS_KICAD_IFACE::SyncWorld( PNS::NODE *aWorld )
for( auto gitem : m_board->Drawings() )
{
syncGraphicalItem( aWorld, static_cast<DRAWSEGMENT*>( gitem ) );
if ( gitem->Type() == PCB_LINE_T )
{
syncGraphicalItem( aWorld, static_cast<DRAWSEGMENT*>( gitem ) );
}
}
for( auto zone : m_board->Zones() )