diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 6ef6915ebc..a0354518f6 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -478,7 +478,7 @@ void ROUTER::markViolations( NODE* aNode, ITEM_SET& aCurrent, NODE::ITEM_VECTOR& if( itemToMark->Kind() == ITEM::SOLID_T ) { - if( holeOnly || !m_iface->IsFlashedOnLayer( itemToMark, itemToMark->Layer() ) ) + if( holeOnly || !m_iface->IsFlashedOnLayer( itemToMark, currentItem->Layer() ) ) { SOLID* solid = static_cast( tmp.get() ); solid->SetShape( solid->Hole()->Clone() );