Ensure schematic autosave works if sheet path is invalid

This commit is contained in:
Jon Evans 2020-12-16 21:17:48 -05:00
parent a7ea63e610
commit a484d10470
1 changed files with 4 additions and 1 deletions

View File

@ -850,7 +850,10 @@ bool SCH_EDIT_FRAME::doAutoSave()
bool autoSaveOk = true;
tmp.AssignDir( fn.GetPath() );
if( fn.GetPath().IsEmpty() )
tmp.AssignDir( Prj().GetProjectPath() );
else
tmp.AssignDir( fn.GetPath() );
if( !tmp.IsOk() )
return false;