Fix warning in SYMBOL_LIBS.

This commit is contained in:
Alex Shvartzkop 2024-04-20 20:10:17 +03:00
parent 41c4bd58ba
commit 1e1aecfd28
1 changed files with 3 additions and 3 deletions

View File

@ -312,11 +312,11 @@ SYMBOL_LIB* SYMBOL_LIBS::AddLibrary( const wxString& aFileName, SYMBOL_LIBS::ite
bool SYMBOL_LIBS::ReloadLibrary( const wxString &aFileName ) bool SYMBOL_LIBS::ReloadLibrary( const wxString &aFileName )
{ {
SYMBOL_LIB *lib; wxFileName fn = aFileName;
wxFileName fn = aFileName; SYMBOL_LIB* lib = FindLibrary( fn.GetName() );
// Check if the library already exists. // Check if the library already exists.
if( !( lib = FindLibrary( fn.GetName() ) ) ) if( !lib )
return false; return false;
// Create a clone of the library pointer in case we need to re-add it // Create a clone of the library pointer in case we need to re-add it