Merge pull request #38876 from paulloz/fix-import-params-error

Fix error with 'params' when import dock doesn't define any parameter
This commit is contained in:
Rémi Verschelde 2020-05-20 14:00:01 +02:00 committed by GitHub
commit 55377aa559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -441,7 +441,9 @@ void ImportDock::_reimport() {
} else {
//override entirely
config->set_value("remap", "importer", importer_name);
config->erase_section("params");
if (config->has_section("params")) {
config->erase_section("params");
}
for (List<PropertyInfo>::Element *E = params->properties.front(); E; E = E->next()) {
config->set_value("params", E->get().name, params->values[E->get().name]);