eeschema: Disabled an assert checking if project path is empty
Empty project path is a valid case when eeschema is executed in standalone mode without any file loaded. There were no observed harmful consequences of running eeschema without the project path set, but to stay safe the project specific sym-lib-table load code is executed only when the project path is set.
This commit is contained in:
parent
c5cde53dff
commit
f51f30fb1e
|
@ -779,20 +779,21 @@ SYMBOL_LIB_TABLE* PROJECT::SchSymbolLibTable()
|
||||||
|
|
||||||
wxGetEnv( PROJECT_VAR_NAME, &prjPath );
|
wxGetEnv( PROJECT_VAR_NAME, &prjPath );
|
||||||
|
|
||||||
wxASSERT( !prjPath.empty() );
|
if( !prjPath.IsEmpty() )
|
||||||
|
|
||||||
wxFileName fn( prjPath, SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() );
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
tbl->Load( fn.GetFullPath() );
|
wxFileName fn( prjPath, SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() );
|
||||||
}
|
|
||||||
catch( const IO_ERROR& ioe )
|
try
|
||||||
{
|
{
|
||||||
wxString msg;
|
tbl->Load( fn.GetFullPath() );
|
||||||
msg.Printf( _( "An error occurred loading the symbol library table \"%s\"." ),
|
}
|
||||||
fn.GetFullPath() );
|
catch( const IO_ERROR& ioe )
|
||||||
DisplayErrorMessage( NULL, msg, ioe.What() );
|
{
|
||||||
|
wxString msg;
|
||||||
|
msg.Printf( _( "An error occurred loading the symbol library table \"%s\"." ),
|
||||||
|
fn.GetFullPath() );
|
||||||
|
DisplayErrorMessage( NULL, msg, ioe.What() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue