diff --git a/src/instances.cc b/src/instances.cc index 2e8be0de..05d14690 100644 --- a/src/instances.cc +++ b/src/instances.cc @@ -45,7 +45,9 @@ Group::Group( Config::Group const & cfgGroup, } } for ( const auto & dictId : dictOrderList ) { - dictionaries.push_back( groupDicts[ dictId ] ); + if ( groupDicts.contains( dictId ) ) { + dictionaries.push_back( groupDicts[ dictId ] ); + } } } diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 81bda91e..bb3cec96 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -1652,8 +1652,8 @@ void MainWindow::updateDictionaryBar() if ( currentId == Instances::Group::AllGroupId ) dictionaryBar.setMutedDictionaries( &cfg.mutedDictionaries ); else { - Config::Group * grp = cfg.getGroup( currentId ); - dictionaryBar.setMutedDictionaries( grp ? &grp->mutedDictionaries : nullptr ); + Config::Group * _grp = cfg.getGroup( currentId ); + dictionaryBar.setMutedDictionaries( _grp ? &_grp->mutedDictionaries : nullptr ); } dictionaryBar.setDictionaries( grp->dictionaries );