mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-03-30 05:46:55 +00:00
~EDA_DRAW_PANEL_GAL(): Fix crash: ensure a onShowEvent is not fired.
Due to changes in EDA_DRAW_PANEL_GAL (a wxEVT_SHOW event was added) when destroyed a dialog using it (namely the PAD editor) a wxEVT_SHOW event was fired during Dtor process (at least on Windows). It is now disabled in Dtor.
This commit is contained in:
parent
a648fccbb3
commit
21725eeef3
@ -166,6 +166,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
|
||||
|
||||
EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL()
|
||||
{
|
||||
// Ensure EDA_DRAW_PANEL_GAL::onShowEvent is not fired during Dtor process
|
||||
Disconnect( wxEVT_SHOW, wxShowEventHandler( EDA_DRAW_PANEL_GAL::onShowEvent ) );
|
||||
StopDrawing();
|
||||
|
||||
wxASSERT( !m_drawing );
|
||||
@ -173,6 +175,7 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL()
|
||||
delete m_viewControls;
|
||||
delete m_view;
|
||||
delete m_gal;
|
||||
m_gal = nullptr; // Ensure OnShow is not called
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user