fix regression

This commit is contained in:
Valentin Vanelslande 2018-12-29 16:23:33 -05:00
parent dce82fa005
commit 64b992487e
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,7 @@ void Config::ReadValues() {
Settings::values.input_profiles.emplace_back(std::move(profile));
};
const int num_input_profiles = qt_config->beginReadArray("profiles");
int num_input_profiles = qt_config->beginReadArray("profiles");
for (int i = 0; i < num_input_profiles; ++i) {
qt_config->setArrayIndex(i);
@ -106,6 +106,7 @@ void Config::ReadValues() {
// create a input profile if no input profiles exist, with the default or old settings
if (num_input_profiles == 0) {
append_profile();
num_input_profiles = 1;
}
// ensure that the current input profile index is valid.