Fix segfault when discarding changes on open
When opening new schematic, the undo/redo list is invalidated. CleanupSchematic uses it before presenting the new schematic to the user, so we need to make sure that old data are not preserved here past their pointer lifetimes
This commit is contained in:
parent
4a81e4c945
commit
ca6e43d1e1
|
@ -152,6 +152,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
|
||||
// unload current project file before loading new
|
||||
{
|
||||
ClearUndoRedoList();
|
||||
SetScreen( nullptr );
|
||||
m_toolManager->GetTool<EE_INSPECTION_TOOL>()->Reset( TOOL_BASE::MODEL_RELOAD );
|
||||
CreateScreens();
|
||||
|
|
Loading…
Reference in New Issue