Lazily initialize m_main_config_dialog (Issue #10213)

This commit is contained in:
spycrab 2017-04-16 13:00:11 +02:00
parent feefe15485
commit 01e07d7853
2 changed files with 2 additions and 2 deletions

View File

@ -321,8 +321,6 @@ CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, wxRect geo
{
BindEvents();
m_main_config_dialog = new CConfigMain(this);
for (int i = 0; i <= IDM_CODE_WINDOW - IDM_LOG_WINDOW; i++)
bFloatWindow[i] = false;

View File

@ -259,6 +259,8 @@ wxToolBar* CFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& na
void CFrame::OpenGeneralConfiguration(wxWindowID tab_id)
{
if (!m_main_config_dialog)
m_main_config_dialog = new CConfigMain(this);
if (tab_id > wxID_ANY)
m_main_config_dialog->SetSelectedTab(tab_id);