From e07bc4e51a563903d80dfedf3317dd31127f3718 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 21 Aug 2019 23:22:14 -0400 Subject: [PATCH] Fix crash when viewing profiles --- Tusker/Screens/Profile/ProfileTableViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tusker/Screens/Profile/ProfileTableViewController.swift b/Tusker/Screens/Profile/ProfileTableViewController.swift index 873fa2d0e3..24f10c53be 100644 --- a/Tusker/Screens/Profile/ProfileTableViewController.swift +++ b/Tusker/Screens/Profile/ProfileTableViewController.swift @@ -176,7 +176,7 @@ class ProfileTableViewController: EnhancedTableViewController { } override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { - if indexPath.section == timelineSegments.count && indexPath.row == timelineSegments[indexPath.section - 1].count - 1 { + if timelineSegments.count > 0 && indexPath.section == timelineSegments.count && indexPath.row == timelineSegments[indexPath.section - 1].count - 1 { guard let older = older else { return } getStatuses(for: older) { response in