From 01e07d785333ad362db97dcaec7eef7690b54a1c Mon Sep 17 00:00:00 2001 From: spycrab Date: Sun, 16 Apr 2017 13:00:11 +0200 Subject: [PATCH] Lazily initialize m_main_config_dialog (Issue #10213) --- Source/Core/DolphinWX/Frame.cpp | 2 -- Source/Core/DolphinWX/FrameTools.cpp | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index ddedd06525..184e9e681e 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -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; diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 608141e94e..e3f268f426 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -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);