Browse Source

Prevent segfault on schematic frame close

We are seeing multiple events firing when closing via the manager frame.
Cleaning up the schematic should only happen once.
pull/16/head
Jon Evans 5 years ago
parent
commit
433616cbf0
  1. 4
      eeschema/sch_edit_frame.cpp

4
eeschema/sch_edit_frame.cpp

@ -501,6 +501,10 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent )
if( simFrame && !simFrame->Close() ) // Can close the simulator?
return;
// We may have gotten multiple events; don't clean up twice
if( !Schematic().IsValid() )
return;
SCH_SHEET_LIST sheetlist = Schematic().GetSheets();
if( sheetlist.IsModified() )

Loading…
Cancel
Save