Browse Source

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.
pull/17/head
Maciej Suminski 8 years ago
parent
commit
f51f30fb1e
  1. 27
      eeschema/eeschema_config.cpp

27
eeschema/eeschema_config.cpp

@ -779,20 +779,21 @@ SYMBOL_LIB_TABLE* PROJECT::SchSymbolLibTable()
wxGetEnv( PROJECT_VAR_NAME, &prjPath );
wxASSERT( !prjPath.empty() );
wxFileName fn( prjPath, SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() );
try
{
tbl->Load( fn.GetFullPath() );
}
catch( const IO_ERROR& ioe )
if( !prjPath.IsEmpty() )
{
wxString msg;
msg.Printf( _( "An error occurred loading the symbol library table \"%s\"." ),
fn.GetFullPath() );
DisplayErrorMessage( NULL, msg, ioe.What() );
wxFileName fn( prjPath, SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() );
try
{
tbl->Load( fn.GetFullPath() );
}
catch( const IO_ERROR& ioe )
{
wxString msg;
msg.Printf( _( "An error occurred loading the symbol library table \"%s\"." ),
fn.GetFullPath() );
DisplayErrorMessage( NULL, msg, ioe.What() );
}
}
}

Loading…
Cancel
Save