Coverity fixes

This commit is contained in:
Jon Evans 2021-02-24 22:55:11 -05:00
parent 8d62c73b86
commit bba7fae104
2 changed files with 8 additions and 2 deletions

View File

@ -116,7 +116,7 @@ PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP( PAGED_DIALOG* aParent, PCB
synchronizeWithBoard( true );
m_choiceCopperLayers->Bind( wxEVT_CHOICE,
[&]( wxCommandEvent )
[&]( wxCommandEvent& )
{
updateCopperLayerCount();
showOnlyActiveLayers();
@ -1217,6 +1217,8 @@ void PANEL_SETUP_BOARD_STACKUP::onMaterialChange( wxCommandEvent& event )
default: item_mat_list = nullptr; break;
}
wxCHECK( item_mat_list, /* void */ );
DIALOG_DIELECTRIC_MATERIAL dlg( this, *item_mat_list );
if( dlg.ShowModal() != wxID_OK )

View File

@ -121,7 +121,9 @@ static LSEQ dlg_layers()
PANEL_SETUP_LAYERS::PANEL_SETUP_LAYERS( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame ) :
PANEL_SETUP_LAYERS_BASE( aParent->GetTreebook() ),
m_parentDialog( aParent ), m_frame( aFrame )
m_parentDialog( aParent ),
m_frame( aFrame ),
m_physicalStackup( nullptr )
{
m_pcb = aFrame->GetBoard();
}
@ -443,6 +445,8 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
if( !testLayerNames() )
return false;
wxASSERT( m_physicalStackup );
// Make sure we have the latest copper layer count
SyncCopperLayers( m_physicalStackup->GetCopperLayerCount() );