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:
parent
0fcb965b15
commit
77abcf1579
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user