Move simulator settings disposal earlier so it happens before parent.

Fixes https://gitlab.com/kicad/code/kicad/issues/12370
This commit is contained in:
Jeff Young 2022-12-11 01:29:58 +00:00
parent 4e47b5c25f
commit 3581a9773f
1 changed files with 3 additions and 2 deletions

View File

@ -239,8 +239,6 @@ SIM_PLOT_FRAME::~SIM_PLOT_FRAME()
{
NULL_REPORTER devnull;
m_simulator->Settings() = nullptr;
m_simulator->Attach( nullptr, devnull );
m_simulator->SetReporter( nullptr );
delete m_reporter;
@ -1694,6 +1692,9 @@ void SIM_PLOT_FRAME::doCloseWindow()
m_schematicFrame->GetToolManager()->RunAction( ACTIONS::cancelInteractive );
SaveSettings( config() );
m_simulator->Settings() = nullptr;
Destroy();
}