소스 검색

ava: Fix crash when extracting sections from NCA with no data section (#5002)

Tested against Omega Strickers.
Mary 3 년 전
부모
커밋
b3bf05356b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Ryujinx.Ava/Common/ApplicationHelper.cs

+ 1 - 1
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;
                                 }