When would currentProfile
be not in profileChoices
?
And if so, silent-failing might confuse the user, unable to figure out why. Either we print an error message in journal, so we can ask the user to look for that in bug reports, or how about if (newIndex < 0) newIndex = 0;
?