Pcbnew: fix a crash when trying to edit a pad in the board editor

This commit is contained in:
jean-pierre charras 2020-05-28 09:51:06 +02:00
parent 182973c0ee
commit 601633347c
1 changed files with 6 additions and 3 deletions

View File

@ -100,11 +100,14 @@ void PCB_BASE_FRAME::InstallPadOptionsFrame( D_PAD* aPad )
DIALOG_PAD_PROPERTIES dlg( this, aPad ); DIALOG_PAD_PROPERTIES dlg( this, aPad );
if( dlg.ShowQuasiModal() == wxID_OK ) // QuasiModal required for NET_SELECTOR if( dlg.ShowQuasiModal() == wxID_OK ) // QuasiModal required for NET_SELECTOR
{
if( aPad && m_Ident == FRAME_PCB_MODULE_EDITOR )
{ {
MODULE_EDITOR_TOOLS* fpTools = m_toolManager->GetTool<MODULE_EDITOR_TOOLS>(); MODULE_EDITOR_TOOLS* fpTools = m_toolManager->GetTool<MODULE_EDITOR_TOOLS>();
fpTools->SetLastPadName( aPad->GetName() ); fpTools->SetLastPadName( aPad->GetName() );
} }
} }
}
DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ) : DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad ) :