From b3bf05356be755bcbf82611530ebd44c9b61b384 Mon Sep 17 00:00:00 2001 From: Mary Date: Wed, 17 May 2023 21:27:49 +0200 Subject: [PATCH] ava: Fix crash when extracting sections from NCA with no data section (#5002) Tested against Omega Strickers. --- src/Ryujinx.Ava/Common/ApplicationHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }