Fix order of operations for macOS template check

Backport for 3.x from PR: #84990
Co-authored-by: brno32 <drozdster@gmail.com>
This commit is contained in:
kilian-diener 2025-07-24 13:41:25 +02:00
parent 17b5769d56
commit 983b12b1fa

View file

@ -1910,9 +1910,9 @@ bool EditorExportPlatformOSX::has_valid_export_configuration(const Ref<EditorExp
String err;
bool valid = false;
// Look for export templates (custom templates).
bool dvalid = false;
bool rvalid = false;
// Look for export templates (official templates first, then custom).
bool dvalid = exists_export_template("osx.zip", &err);
bool rvalid = dvalid; // Both in the same ZIP.
if (p_preset->get("custom_template/debug") != "") {
dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
@ -1927,12 +1927,6 @@ bool EditorExportPlatformOSX::has_valid_export_configuration(const Ref<EditorExp
}
}
// Look for export templates (official templates, check only is custom templates are not set).
if (!dvalid || !rvalid) {
dvalid = exists_export_template("osx.zip", &err);
rvalid = dvalid; // Both in the same ZIP.
}
valid = dvalid || rvalid;
r_missing_templates = !valid;