Эх сурвалжийг харах

Crash fix for info (#2450)

Signed-off-by: abhishek2513 <abhishek.dogra25130@gmail.com>
Abhishek Dogra 1 жил өмнө
parent
commit
54252cde69

+ 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()