diff options
author | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2018-08-28 15:24:58 -0300 |
---|---|---|
committer | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2018-09-07 16:43:11 -0300 |
commit | dff7366c8624185194ac403b7fd031adfe35a72f (patch) | |
tree | 784106144fe4be63a8e7657735ee996b4b8336ac /editor/editor_file_system.cpp | |
parent | 4b6846a59d785af3bef6a29958387ed0ee0f6575 (diff) |
Fix error when reimporting an Image resource
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r-- | editor/editor_file_system.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 9562a8c63c..d4d6b51e94 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1479,12 +1479,16 @@ void EditorFileSystem::_reimport_file(const String &p_file) { cf.instance(); Error err = cf->load(p_file + ".import"); if (err == OK) { - List<String> sk; - cf->get_section_keys("params", &sk); - for (List<String>::Element *E = sk.front(); E; E = E->next()) { - params[E->get()] = cf->get_value("params", E->get()); + if (cf->has_section("params")) { + List<String> sk; + cf->get_section_keys("params", &sk); + for (List<String>::Element *E = sk.front(); E; E = E->next()) { + params[E->get()] = cf->get_value("params", E->get()); + } + } + if (cf->has_section("remap")) { + importer_name = cf->get_value("remap", "importer"); } - importer_name = cf->get_value("remap", "importer"); } } else { |