mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Make sure that we are disconnected before dtor
The child class removes itself from the parent panel, which calls the DTOR. This automatically disconnects the events, so if we want to explicitly do this, we need to do it before freeing the memory Fixes https://gitlab.com/kicad/code/kicad/-/issues/21307
This commit is contained in:
parent
b165240118
commit
8b62eac886
@ -604,11 +604,10 @@ PANEL_COMPONENT_CLASS_CONDITION_REFERENCE::PANEL_COMPONENT_CLASS_CONDITION_REFER
|
||||
|
||||
void PANEL_COMPONENT_CLASS_CONDITION_REFERENCE::OnDeleteConditionClick( wxCommandEvent& event )
|
||||
{
|
||||
m_panelParent->RemoveCondition( this );
|
||||
|
||||
Disconnect( wxEVT_MENU,
|
||||
wxCommandEventHandler( PANEL_COMPONENT_CLASS_CONDITION_REFERENCE::onMenu ), nullptr,
|
||||
this );
|
||||
m_panelParent->RemoveCondition( this );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user