Merge pull request #92815 from aaronp64/keep_skip_import_crash
Fix Keep/Skip File import selection crash
This commit is contained in:
commit
91e166a0c0
1 changed files with 9 additions and 7 deletions
|
@ -189,6 +189,7 @@ void ImportDock::_update_options(const String &p_path, const Ref<ConfigFile> &p_
|
||||||
params->base_options_path = p_path;
|
params->base_options_path = p_path;
|
||||||
|
|
||||||
HashMap<StringName, Variant> import_options;
|
HashMap<StringName, Variant> import_options;
|
||||||
|
if (p_config.is_valid() && p_config->has_section("params")) {
|
||||||
List<String> section_keys;
|
List<String> section_keys;
|
||||||
p_config->get_section_keys("params", §ion_keys);
|
p_config->get_section_keys("params", §ion_keys);
|
||||||
for (const String §ion_key : section_keys) {
|
for (const String §ion_key : section_keys) {
|
||||||
|
@ -197,6 +198,7 @@ void ImportDock::_update_options(const String &p_path, const Ref<ConfigFile> &p_
|
||||||
if (params->importer.is_valid()) {
|
if (params->importer.is_valid()) {
|
||||||
params->importer->handle_compatibility_options(import_options);
|
params->importer->handle_compatibility_options(import_options);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const ResourceImporter::ImportOption &E : options) {
|
for (const ResourceImporter::ImportOption &E : options) {
|
||||||
params->properties.push_back(E.option);
|
params->properties.push_back(E.option);
|
||||||
|
|
Loading…
Reference in a new issue