From 66e00a267086b53c9146c99c715ca0bd60c21510 Mon Sep 17 00:00:00 2001 From: Paul Joannon Date: Wed, 20 May 2020 01:03:03 +0200 Subject: [PATCH] check the params section exist before erasing it in import_dock related #38864 (cherry picked from commit b7a694679013b56b4ffcb9b98b6c8cb2252202cd) --- editor/import_dock.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 7fbc8d426f1..e1abb709d5f 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -460,7 +460,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::Element *E = params->properties.front(); E; E = E->next()) { config->set_value("params", E->get().name, params->values[E->get().name]);