Fix a crash bug when changing footprint name

Save-As to a new footprint name will cause the fp table to reload.  We
were incorrectly locking the indices in a manner that did not protect
the proper index, causing lock errors that threw/crashed editor
This commit is contained in:
Seth Hillbrand 2021-12-09 10:46:43 -08:00
parent 9884f40952
commit 70841c6393
1 changed files with 1 additions and 2 deletions

View File

@ -185,10 +185,9 @@ LIB_TABLE_ROW* LIB_TABLE::findRow( const wxString& aNickName, bool aCheckIfEnabl
LIB_TABLE_ROW* row = nullptr;
LIB_TABLE* cur = (LIB_TABLE*) this;
std::lock_guard<std::recursive_mutex> lock( m_nickIndexMutex );
do
{
std::lock_guard<std::recursive_mutex> lock( cur->m_nickIndexMutex );
cur->ensureIndex();
for( const std::pair<const wxString, int>& entry : cur->nickIndex )