diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 3c06c684144..2347c715a8d 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -189,13 +189,15 @@ void ImportDock::_update_options(const String &p_path, const Ref &p_ params->base_options_path = p_path; HashMap import_options; - List section_keys; - p_config->get_section_keys("params", §ion_keys); - for (const String §ion_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 section_keys; + p_config->get_section_keys("params", §ion_keys); + for (const String §ion_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) {