7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 20:59:17 +00:00

Make sure std::unique_ptr gets initialized.

(Fixes unit test failure.)
This commit is contained in:
Jeff Young 2023-01-11 18:28:14 +00:00
parent 096cc7a5ad
commit 8238973bf4

View File

@ -252,6 +252,11 @@ void BOARD::IncrementTimeStamp()
m_CopperZoneRTreeCache.clear();
m_CopperItemRTreeCache = std::make_unique<DRC_RTREE>();
}
else if( !m_CopperItemRTreeCache )
{
std::unique_lock<std::mutex> cacheLock( m_CachesMutex );
m_CopperItemRTreeCache = std::make_unique<DRC_RTREE>();
}
}