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:
parent
9884f40952
commit
70841c6393
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue