mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-18 16:41:14 +02:00
Don't crash on exit when showing Nyquist workbench
This commit is contained in:
@@ -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()) {
|
||||
|
@@ -107,6 +107,7 @@ class NyqBench:public wxFrame
|
||||
void ShowNyqBench(const CommandContext&);
|
||||
|
||||
static NyqBench *GetBench();
|
||||
void SavePrefs();
|
||||
|
||||
private:
|
||||
void PopulateOrExchange(ShuttleGui & S);
|
||||
|
Reference in New Issue
Block a user