diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-13 14:09:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 14:09:39 +0200 |
commit | bcc50de2d168c3184dc5c07bbfbea68236c32864 (patch) | |
tree | f8b7f4a0e010a2a629ffa73a89458874b88b0e3c /editor | |
parent | 9b31d2da1c20807928ac2aea41a187184f9ee051 (diff) | |
parent | dff7366c8624185194ac403b7fd031adfe35a72f (diff) |
Merge pull request #21540 from YeldhamDev/image_reimp_error_fix
Fix error when reimporting an Image resource
Diffstat (limited to 'editor')
-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 6e684fcd4c..3d034989ed 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 { |