Avoid crash on step export
Detach the wxProcess from the chain before closing Fixes https://gitlab.com/kicad/code/kicad/-/issues/16608
This commit is contained in:
parent
6f52220741
commit
13544ff975
|
@ -54,7 +54,6 @@ public:
|
|||
~STDSTREAM_THREAD()
|
||||
{
|
||||
delete[] m_buffer;
|
||||
delete m_process;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -210,10 +209,21 @@ void DIALOG_EXPORT_STEP_LOG::onClose( wxCloseEvent& aEvent )
|
|||
{
|
||||
m_msgQueue.Post( STATE_MESSAGE::REQUEST_EXIT );
|
||||
m_stdioThread->Wait();
|
||||
delete m_stdioThread;
|
||||
|
||||
m_process->DeletePendingEvents();
|
||||
m_process->Unlink();
|
||||
m_process->CloseOutput();
|
||||
m_process->Detach();
|
||||
|
||||
m_stdioThread->Delete();
|
||||
}
|
||||
|
||||
Destroy();
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
DIALOG_EXPORT_STEP_LOG::~DIALOG_EXPORT_STEP_LOG()
|
||||
{
|
||||
delete m_stdioThread;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ public:
|
|||
};
|
||||
|
||||
DIALOG_EXPORT_STEP_LOG( wxWindow* aParent, wxString aStepCmd );
|
||||
~DIALOG_EXPORT_STEP_LOG() override;
|
||||
|
||||
private:
|
||||
void appendMessage( const wxString& aMessage );
|
||||
|
|
Loading…
Reference in New Issue