Avoid assertion in some cases.
This commit is contained in:
parent
9f64850325
commit
77f47b6e47
|
@ -305,7 +305,10 @@ std::vector<BOARD_ITEM*> DRAWING_TOOL::DrawSpecificationStackup( const wxPoint&
|
||||||
// In this case, for dielectric, a dummy name will be used
|
// In this case, for dielectric, a dummy name will be used
|
||||||
if( stackup_item->GetLayerName().IsEmpty() )
|
if( stackup_item->GetLayerName().IsEmpty() )
|
||||||
{
|
{
|
||||||
wxString ly_name = m_frame->GetBoard()->GetLayerName( stackup_item->GetBrdLayerId() );
|
wxString ly_name;
|
||||||
|
|
||||||
|
if( IsValidLayer( stackup_item->GetBrdLayerId() ) )
|
||||||
|
ly_name = m_frame->GetBoard()->GetLayerName( stackup_item->GetBrdLayerId() );
|
||||||
|
|
||||||
if( ly_name.IsEmpty() && stackup_item->GetType() == BS_ITEM_TYPE_DIELECTRIC )
|
if( ly_name.IsEmpty() && stackup_item->GetType() == BS_ITEM_TYPE_DIELECTRIC )
|
||||||
ly_name = _( "Dielectric" );
|
ly_name = _( "Dielectric" );
|
||||||
|
|
Loading…
Reference in New Issue