check the params section exist before erasing it in import_dock

related #38864
This commit is contained in:
Paul Joannon 2020-05-20 01:03:03 +02:00
parent cba1f492cc
commit b7a6946790

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]);