From 70841c6393baa207b06bd4aeefc4af251de8d03b Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 9 Dec 2021 10:46:43 -0800 Subject: [PATCH] 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 --- common/lib_table_base.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/lib_table_base.cpp b/common/lib_table_base.cpp index c6e2626adb..bfb815fbdb 100644 --- a/common/lib_table_base.cpp +++ b/common/lib_table_base.cpp @@ -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 lock( m_nickIndexMutex ); - do { + std::lock_guard lock( cur->m_nickIndexMutex ); cur->ensureIndex(); for( const std::pair& entry : cur->nickIndex )