Eeschema: fix crash when trying to save as a library in a non writable folder.
The crash was due to a non caught thrown error. Fixes #4914 https://gitlab.com/kicad/code/kicad/issues/4914
This commit is contained in:
parent
ba90416096
commit
1d450adfdf
|
@ -209,7 +209,17 @@ bool LIB_MANAGER::SaveLibrary( const wxString& aLibrary, const wxString& aFileNa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pi->SaveLibrary( aFileName );
|
try
|
||||||
|
{
|
||||||
|
pi->SaveLibrary( aFileName );
|
||||||
|
}
|
||||||
|
catch( ... )
|
||||||
|
{
|
||||||
|
// return false because something happens.
|
||||||
|
// The library is not successfully saved
|
||||||
|
res = false;
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue