summaryrefslogtreecommitdiff
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
authorMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-08-28 15:24:58 -0300
committerMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-09-07 16:43:11 -0300
commitdff7366c8624185194ac403b7fd031adfe35a72f (patch)
tree784106144fe4be63a8e7657735ee996b4b8336ac /editor/editor_file_system.cpp
parent4b6846a59d785af3bef6a29958387ed0ee0f6575 (diff)
Fix error when reimporting an Image resource
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r--editor/editor_file_system.cpp14
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 {