Fixed crash with the list of groups

This commit is contained in:
Emmanuel BENOîT 2018-04-01 14:35:00 +02:00
parent d6c3bc1131
commit f066299c30

View file

@ -1643,16 +1643,19 @@ void T_SyncViewImpl_::displayOverrideSelector( ) noexcept
BeginChild( "content" );
Common::Sync( ).visitOverrides( [&]( T_SyncOverrideVisitor::T_Element element , const bool exit ) {
if ( element.hasType< T_SyncOverrideSection* >( ) ) {
auto const& sos{ *element.value< T_SyncOverrideSection* >( ) };
auto& sos{ *element.value< T_SyncOverrideSection* >( ) };
if ( sos.title == "*root*" ) {
return true;
}
if ( exit ) {
if ( sos.open ) {
TreePop( );
}
return true;
}
return TreeNodeEx( &sos.cTitle[ 0 ] ,
sos.open = TreeNodeEx( &sos.cTitle[ 0 ] ,
ImGuiTreeNodeFlags_DefaultOpen );
return sos.open;
}
if ( ! exit ) {
return false;