Eeschema: fix segfault when auto save file is detected.
Fixes https://gitlab.com/kicad/code/kicad/issues/5068
This commit is contained in:
parent
c30dc04571
commit
673677c831
|
@ -284,14 +284,14 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
}
|
||||
else
|
||||
{
|
||||
// This will rename the file if there is an autosave and the user want to recover
|
||||
CheckForAutoSaveFile( fullFileName );
|
||||
|
||||
SetScreen( nullptr );
|
||||
delete g_RootSheet; // Delete the current project.
|
||||
g_RootSheet = NULL; // Force CreateScreens() to build new empty project on load failure.
|
||||
SCH_PLUGIN::SCH_PLUGIN_RELEASER pi( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_LEGACY ) );
|
||||
|
||||
// This will rename the file if there is an autosave and the user want to recover
|
||||
CheckForAutoSaveFile( fullFileName );
|
||||
|
||||
try
|
||||
{
|
||||
g_RootSheet = pi->Load( fullFileName, &Kiway() );
|
||||
|
|
Loading…
Reference in New Issue