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
1 changed files with 2 additions and 2 deletions

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;
}