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" ); BeginChild( "content" );
Common::Sync( ).visitOverrides( [&]( T_SyncOverrideVisitor::T_Element element , const bool exit ) { Common::Sync( ).visitOverrides( [&]( T_SyncOverrideVisitor::T_Element element , const bool exit ) {
if ( element.hasType< T_SyncOverrideSection* >( ) ) { if ( element.hasType< T_SyncOverrideSection* >( ) ) {
auto const& sos{ *element.value< T_SyncOverrideSection* >( ) }; auto& sos{ *element.value< T_SyncOverrideSection* >( ) };
if ( sos.title == "*root*" ) { if ( sos.title == "*root*" ) {
return true; return true;
} }
if ( exit ) { if ( exit ) {
TreePop( ); if ( sos.open ) {
TreePop( );
}
return true; return true;
} }
return TreeNodeEx( &sos.cTitle[ 0 ] , sos.open = TreeNodeEx( &sos.cTitle[ 0 ] ,
ImGuiTreeNodeFlags_DefaultOpen ); ImGuiTreeNodeFlags_DefaultOpen );
return sos.open;
} }
if ( ! exit ) { if ( ! exit ) {
return false; return false;