Guard against dynamic cast failure
This commit is contained in:
parent
50b2271f84
commit
967587adcc
|
@ -1006,6 +1006,9 @@ bool PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup()
|
||||||
const FAB_LAYER_COLOR* color_list = GetColorStandardList();
|
const FAB_LAYER_COLOR* color_list = GetColorStandardList();
|
||||||
|
|
||||||
wxBitmapComboBox* choice = dynamic_cast<wxBitmapComboBox*>( ui_item.m_ColorCtrl );
|
wxBitmapComboBox* choice = dynamic_cast<wxBitmapComboBox*>( ui_item.m_ColorCtrl );
|
||||||
|
|
||||||
|
if( choice )
|
||||||
|
{
|
||||||
int idx = choice->GetSelection();
|
int idx = choice->GetSelection();
|
||||||
|
|
||||||
if( idx == GetColorUserDefinedListIdx() )
|
if( idx == GetColorUserDefinedListIdx() )
|
||||||
|
@ -1017,6 +1020,7 @@ bool PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup()
|
||||||
else
|
else
|
||||||
item->SetColor( color_list[idx].m_ColorName );
|
item->SetColor( color_list[idx].m_ColorName );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue