Fix error when exporting files without import parameters

This commit is contained in:
yds 2024-07-15 17:35:47 -03:00
parent 97b8ad1af0
commit 326e51750b
1 changed files with 12 additions and 4 deletions

View File

@ -1229,8 +1229,12 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
config->set_value("remap", "path", export_path); config->set_value("remap", "path", export_path);
// Erase useless sections. // Erase useless sections.
config->erase_section("deps"); if (config->has_section("deps")) {
config->erase_section("params"); config->erase_section("deps");
}
if (config->has_section("params")) {
config->erase_section("params");
}
String import_text = config->encode_to_text(); String import_text = config->encode_to_text();
CharString cs = import_text.utf8(); CharString cs = import_text.utf8();
@ -1294,8 +1298,12 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
} }
// Erase useless sections. // Erase useless sections.
config->erase_section("deps"); if (config->has_section("deps")) {
config->erase_section("params"); config->erase_section("deps");
}
if (config->has_section("params")) {
config->erase_section("params");
}
String import_text = config->encode_to_text(); String import_text = config->encode_to_text();
CharString cs = import_text.utf8(); CharString cs = import_text.utf8();