소스 검색

Crash fix for info (#2450)

Signed-off-by: abhishek2513 <abhishek.dogra25130@gmail.com>
Abhishek Dogra 1 년 전
부모
커밋
54252cde69
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      iOSClient/Share/NCSharePaging.swift

+ 1 - 1
iOSClient/Share/NCSharePaging.swift

@@ -89,7 +89,7 @@ class NCSharePaging: UIViewController {
 
         pagingViewController.dataSource = self
         pagingViewController.delegate = self
-        pagingViewController.select(index: page.rawValue)
+        pagingViewController.select(index: page.rawValue < pages.count ? page.rawValue : max(pages.count - 1, 0))
 
         (pagingViewController.view as? NCSharePagingView)?.setupConstraints()
         pagingViewController.reloadMenu()