Footprint Editor: fix a crash when the dialog to set pad properties is called from the main toolbar (i.e. to define the default setting for new pads, and not to edit an existing pad)

This commit is contained in:
jean-pierre charras 2014-03-13 08:15:19 +01:00
parent 527011208c
commit d00fae588a
1 changed files with 3 additions and 3 deletions

View File

@ -149,10 +149,10 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
{
m_canUpdate = false;
m_parent = aParent;
m_currentPad = aPad;
m_currentPad = aPad; // aPad can be NULL, if the dialog is calleg
// from the modoule editor to set default pad characteristics
m_board = m_parent->GetBoard();
m_dummyPad = new D_PAD( aPad->GetParent() );
m_padMaster.SetParent( aPad->GetParent() );
m_dummyPad = new D_PAD( (MODULE*) NULL );
if( aPad )
m_dummyPad->Copy( aPad );