Fixed bug in source selection

This commit is contained in:
Ryzerth 2021-07-27 15:47:11 +02:00
parent 21f4c40e7f
commit 0498a48b93

View File

@ -76,6 +76,7 @@ namespace sourecmenu {
auto it = std::find(sourceNames.begin(), sourceNames.end(), name);
if (it == sourceNames.end()) {
selectSource(sourceNames[0]);
return;
}
sourceId = std::distance(sourceNames.begin(), it);
selectedSource = sourceNames[sourceId];