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.
This commit is contained in:
parent
d97e519036
commit
433616cbf0
|
@ -501,6 +501,10 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent )
|
||||||
if( simFrame && !simFrame->Close() ) // Can close the simulator?
|
if( simFrame && !simFrame->Close() ) // Can close the simulator?
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// We may have gotten multiple events; don't clean up twice
|
||||||
|
if( !Schematic().IsValid() )
|
||||||
|
return;
|
||||||
|
|
||||||
SCH_SHEET_LIST sheetlist = Schematic().GetSheets();
|
SCH_SHEET_LIST sheetlist = Schematic().GetSheets();
|
||||||
|
|
||||||
if( sheetlist.IsModified() )
|
if( sheetlist.IsModified() )
|
||||||
|
|
Loading…
Reference in New Issue