summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-05-20 14:00:01 +0200
committerGitHub <noreply@github.com>2020-05-20 14:00:01 +0200
commit55377aa559a93dab1d479a7e45d4c717306b309e (patch)
treecc47a2e1ea2513ea448e91ee848848743c16af69
parent1d573969c0b71165947004f1bff64e7bf76791cd (diff)
parentb7a694679013b56b4ffcb9b98b6c8cb2252202cd (diff)
Merge pull request #38876 from paulloz/fix-import-params-error
Fix error with 'params' when import dock doesn't define any parameter
-rw-r--r--editor/import_dock.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 1128b72c5a..8ab2e0aef1 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -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]);