From dff7366c8624185194ac403b7fd031adfe35a72f Mon Sep 17 00:00:00 2001 From: Michael Alexsander Silva Dias Date: Tue, 28 Aug 2018 15:24:58 -0300 Subject: [PATCH] Fix error when reimporting an Image resource --- editor/editor_file_system.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 9562a8c63c8..d4d6b51e941 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 sk; - cf->get_section_keys("params", &sk); - for (List::Element *E = sk.front(); E; E = E->next()) { - params[E->get()] = cf->get_value("params", E->get()); + if (cf->has_section("params")) { + List sk; + cf->get_section_keys("params", &sk); + for (List::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 {