diff --git a/obs/window-main-basic.cpp b/obs/window-main-basic.cpp index d72bf03d9..f4167941b 100644 --- a/obs/window-main-basic.cpp +++ b/obs/window-main-basic.cpp @@ -119,8 +119,8 @@ void OBSBasic::sourceDownClicked(wxCommandEvent &event) void OBSBasic::settingsClicked(wxCommandEvent &event) { - OBSBasicSettings *test = new OBSBasicSettings(this); - test->ShowModal(); + OBSBasicSettings test(this); + test.ShowModal(); } void OBSBasic::exitClicked(wxCommandEvent &event) diff --git a/obs/window-settings-basic.cpp b/obs/window-settings-basic.cpp index 956925537..1a7c9035e 100644 --- a/obs/window-settings-basic.cpp +++ b/obs/window-settings-basic.cpp @@ -52,5 +52,8 @@ void OBSBasicSettings::PageChanging(wxListbookEvent &event) void OBSBasicSettings::OnClose(wxCloseEvent &event) { - Destroy(); + if(IsModal()) + EndModal(0); + else + Destroy(); }