From 8cb389d95c59c545c559b02d08904fc156e1f024 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 25 Aug 2018 11:11:35 +0100 Subject: [PATCH] Use actual parent for dialogs; don't pass nullptr. Fixes: lp:1788962 * https://bugs.launchpad.net/kicad/+bug/1788962 --- common/dialogs/dialog_env_var_config.cpp | 6 +++--- include/kiway_player.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/dialogs/dialog_env_var_config.cpp b/common/dialogs/dialog_env_var_config.cpp index 017756f1f4..e494cfb047 100644 --- a/common/dialogs/dialog_env_var_config.cpp +++ b/common/dialogs/dialog_env_var_config.cpp @@ -193,7 +193,7 @@ bool DIALOG_ENV_VAR_CONFIG::GetPathAtIndex( unsigned int aIndex, wxString& aEnvV void DIALOG_ENV_VAR_CONFIG::OnAddButton( wxCommandEvent& event ) { - DIALOG_ENV_VAR_SINGLE dlg( nullptr, wxEmptyString, wxEmptyString ); + DIALOG_ENV_VAR_SINGLE dlg( this, wxEmptyString, wxEmptyString ); if( dlg.ShowModal() == wxID_OK ) { @@ -230,7 +230,7 @@ void DIALOG_ENV_VAR_CONFIG::EditSelectedEntry() if( GetPathAtIndex( m_pathIndex, envName, envPath ) ) { - auto dlg = new DIALOG_ENV_VAR_SINGLE( nullptr, envName, envPath ); + auto dlg = new DIALOG_ENV_VAR_SINGLE( this, envName, envPath ); if( IsEnvVarImmutable( envName ) ) { @@ -432,7 +432,7 @@ void DIALOG_ENV_VAR_SINGLE::OnSelectPath( wxCommandEvent& event ) wxString title = _( "Select Path for Environment Variable" ); wxString path; // Currently the first opened path is not initialized - wxDirDialog dlg( nullptr, title, path, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST ); + wxDirDialog dlg( this, title, path, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST ); if( dlg.ShowModal() == wxID_OK ) m_envVarPath->SetValue( dlg.GetPath() ); diff --git a/include/kiway_player.h b/include/kiway_player.h index 098892bf34..fe9f54b7e9 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -59,7 +59,7 @@ public: */ KIWAY& Kiway() const { - wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine. + //wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine. return *m_kiway; }