From d00fae588a3f8ece309e110623ecf1edf4103c98 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 13 Mar 2014 08:15:19 +0100 Subject: [PATCH] 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) --- pcbnew/dialogs/dialog_pad_properties.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 42f75d220c..37d10da7e5 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -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 );