Merge pull request #92815 from aaronp64/keep_skip_import_crash

Fix Keep/Skip File import selection crash
This commit is contained in:
Rémi Verschelde 2024-06-10 16:40:53 +02:00
commit 91e166a0c0
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -189,13 +189,15 @@ void ImportDock::_update_options(const String &p_path, const Ref<ConfigFile> &p_
params->base_options_path = p_path;
HashMap<StringName, Variant> import_options;
List<String> section_keys;
p_config->get_section_keys("params", &section_keys);
for (const String &section_key : section_keys) {
import_options[section_key] = p_config->get_value("params", section_key);
}
if (params->importer.is_valid()) {
params->importer->handle_compatibility_options(import_options);
if (p_config.is_valid() && p_config->has_section("params")) {
List<String> section_keys;
p_config->get_section_keys("params", &section_keys);
for (const String &section_key : section_keys) {
import_options[section_key] = p_config->get_value("params", section_key);
}
if (params->importer.is_valid()) {
params->importer->handle_compatibility_options(import_options);
}
}
for (const ResourceImporter::ImportOption &E : options) {