don't fail if the control nca cannot be parsed during install, as it may depend on ticket not yet installed.

This commit is contained in:
ITotalJustice
2025-05-15 15:25:03 +01:00
parent 55ae2a63d9
commit 70a31be134

View File

@@ -929,9 +929,11 @@ Result Yati::InstallNca(std::span<TikCollection> tickets, NcaCollection& nca) {
} else if (nca.header.content_type == nca::ContentType_Control) {
NacpLanguageEntry entry;
std::vector<u8> icon;
R_TRY(nca::ParseControl(path, nca.header.program_id, &entry, sizeof(entry), &icon));
// this may fail if tickets aren't installed and the nca uses title key crypto.
if (R_SUCCEEDED(nca::ParseControl(path, nca.header.program_id, &entry, sizeof(entry), &icon))) {
pbox->SetTitle(entry.name).SetImageData(icon);
}
}
R_SUCCEED();
}