Ignore empty script paths

This commit is contained in:
GriffinR 2023-09-06 21:52:42 -04:00
parent 885695e705
commit 7411ddaeef

View file

@ -214,8 +214,11 @@ void CustomScriptsEditor::save() {
QList<bool> enabledStates;
for (int i = 0; i < ui->list->count(); i++) {
auto item = ui->list->item(i);
paths.append(this->getScriptFilepath(item, false));
enabledStates.append(this->getScriptEnabled(item));
const QString path = this->getScriptFilepath(item, false);
if (!path.isEmpty()) {
paths.append(path);
enabledStates.append(this->getScriptEnabled(item));
}
}
userConfig.setCustomScripts(paths, enabledStates);