aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary <mary@mary.zone>2023-05-17 21:27:49 +0200
committerGitHub <noreply@github.com>2023-05-17 19:27:49 +0000
commitb3bf05356be755bcbf82611530ebd44c9b61b384 (patch)
treee309ab21961301929f67e1ec2916af5674c23424
parentcb4b58052f325864ece956898cdd64373edf896a (diff)
ava: Fix crash when extracting sections from NCA with no data section (#5002)1.1.803
Tested against Omega Strickers.
-rw-r--r--src/Ryujinx.Ava/Common/ApplicationHelper.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Ryujinx.Ava/Common/ApplicationHelper.cs b/src/Ryujinx.Ava/Common/ApplicationHelper.cs
index c961d76c..882c0694 100644
--- a/src/Ryujinx.Ava/Common/ApplicationHelper.cs
+++ b/src/Ryujinx.Ava/Common/ApplicationHelper.cs
@@ -193,7 +193,7 @@ namespace Ryujinx.Ava.Common
if (nca.Header.ContentType == NcaContentType.Program)
{
int dataIndex = Nca.GetSectionIndexFromType(NcaSectionType.Data, NcaContentType.Program);
- if (nca.Header.GetFsHeader(dataIndex).IsPatchSection())
+ if (nca.SectionExists(NcaSectionType.Data) && nca.Header.GetFsHeader(dataIndex).IsPatchSection())
{
patchNca = nca;
}