Skip to content

Commit

Permalink
Merge pull request #94405 from ydeltastar/fix-export-no-params
Browse files Browse the repository at this point in the history
Fix error when exporting files without import parameters
  • Loading branch information
akien-mga committed Jul 17, 2024
2 parents fe427ff + 326e517 commit cb2650c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions editor/export/editor_export_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,12 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
config->set_value("remap", "path", export_path);

// Erase useless sections.
config->erase_section("deps");
config->erase_section("params");
if (config->has_section("deps")) {
config->erase_section("deps");
}
if (config->has_section("params")) {
config->erase_section("params");
}

String import_text = config->encode_to_text();
CharString cs = import_text.utf8();
Expand Down Expand Up @@ -1294,8 +1298,12 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}

// Erase useless sections.
config->erase_section("deps");
config->erase_section("params");
if (config->has_section("deps")) {
config->erase_section("deps");
}
if (config->has_section("params")) {
config->erase_section("params");
}

String import_text = config->encode_to_text();
CharString cs = import_text.utf8();
Expand Down

0 comments on commit cb2650c

Please sign in to comment.