Fix crash when opening schematic setup dialog

m_openPreferencesButton was not correctly initialised to nullptr
This commit is contained in:
Roberto Fernandez Bautista 2023-07-16 21:41:50 +02:00
parent 30928796bd
commit 1a5fb68ace
1 changed files with 1 additions and 1 deletions

View File

@ -52,6 +52,7 @@ PAGED_DIALOG::PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aSho
m_resetButton( nullptr ), m_resetButton( nullptr ),
m_openPrefsDirButton( nullptr ), m_openPrefsDirButton( nullptr ),
m_cancelButton( nullptr ), m_cancelButton( nullptr ),
m_openPreferencesButton( nullptr ),
m_title( aTitle ) m_title( aTitle )
{ {
wxBoxSizer* mainSizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* mainSizer = new wxBoxSizer( wxVERTICAL );
@ -95,7 +96,6 @@ PAGED_DIALOG::PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aSho
m_buttonsSizer->Add( m_openPrefsDirButton, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxLEFT, 5 ); m_buttonsSizer->Add( m_openPrefsDirButton, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxLEFT, 5 );
} }
if( !aAuxiliaryAction.IsEmpty() ) if( !aAuxiliaryAction.IsEmpty() )
{ {
m_auxiliaryButton = new wxButton( this, wxID_ANY, aAuxiliaryAction ); m_auxiliaryButton = new wxButton( this, wxID_ANY, aAuxiliaryAction );