modedit: clear the pcb when closing the window
Before closing the window in the footprint editor, we clear the existing pcb, undo/redo stack and associated memory to prevent callbacks double-freeing on destruction. Fixes: lp:1784504 * https://bugs.launchpad.net/kicad/+bug/1784504
This commit is contained in:
parent
0ac96d177c
commit
c6d1433523
|
@ -503,7 +503,12 @@ void FOOTPRINT_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
|
|||
}
|
||||
|
||||
if( IsGalCanvasActive() )
|
||||
{
|
||||
GetGalCanvas()->SetEventDispatcher( NULL );
|
||||
GetGalCanvas()->StopDrawing();
|
||||
}
|
||||
|
||||
Clear_Pcb( false );
|
||||
|
||||
//close the editor
|
||||
Destroy();
|
||||
|
|
Loading…
Reference in New Issue