check the params section exist before erasing it in import_dock

related #38864

(cherry picked from commit b7a6946790)
This commit is contained in:
Paul Joannon 2020-05-20 01:03:03 +02:00 committed by Rémi Verschelde
parent 48a2fd7a3d
commit 66e00a2670
1 changed files with 3 additions and 1 deletions

View File

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