1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-10 00:51:13 +02:00

Don't crash on exit when showing Nyquist workbench

This commit is contained in:
Paul Licameli 2020-02-17 14:30:37 -05:00
parent 0fcb965b15
commit 77abcf1579
2 changed files with 7 additions and 0 deletions

View File

@ -194,6 +194,8 @@ extern "C"
//Can happen if the menu item was never invoked.
//wxASSERT(gBench != NULL);
if (gBench) {
// be sure to do this while gPrefs still exists:
gBench->SavePrefs();
gBench->Destroy();
gBench = NULL;
}
@ -863,6 +865,10 @@ NyqBench::NyqBench(wxWindow * parent)
}
NyqBench::~NyqBench()
{
}
void NyqBench::SavePrefs()
{
gPrefs->Write(wxT("NyqBench/Window/Maximized"), IsMaximized());
if (!IsMaximized()) {

View File

@ -107,6 +107,7 @@ class NyqBench:public wxFrame
void ShowNyqBench(const CommandContext&);
static NyqBench *GetBench();
void SavePrefs();
private:
void PopulateOrExchange(ShuttleGui & S);