Browse Source

Crash fix for info (#2450)

Signed-off-by: abhishek2513 <abhishek.dogra25130@gmail.com>
Abhishek Dogra 1 year ago
parent
commit
54252cde69
1 changed files with 1 additions and 1 deletions
  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()