1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

Fix Linux & Win crash at start

This commit is contained in:
Paul Licameli 2020-02-03 11:05:04 -05:00
parent 7706e0c865
commit 586d0df449

View File

@ -199,7 +199,7 @@ void RegisterItem( GroupItem &registry, const Placement &placement,
auto pNode = &registry;
pItems = &pNode->items;
auto pathComponents = ::wxSplit( placement.path, '/' );
const auto pathComponents = ::wxSplit( placement.path, '/' );
auto pComponent = pathComponents.begin(), end = pathComponents.end();
// Descend the registry hierarchy, while groups matching the path components
@ -234,7 +234,7 @@ void RegisterItem( GroupItem &registry, const Placement &placement,
while ( pComponent != end ) {
auto newNode = std::make_unique<TransparentGroupItem<>>( *pComponent );
pNode = newNode.get();
pItems->insert( find( newNode->name ).second, std::move( newNode ) );
pItems->insert( find( pNode->name ).second, std::move( newNode ) );
pItems = &pNode->items;
++pComponent;
}