Fix: potential out of bounds exception

This commit is contained in:
Duy Tran Khanh committed 2023-04-04 07:10:42 +07:00
1 parent cd475202a9
commit fcb9062b47
1 file changed
+2
+2
View File
@@ -176,6 +176,8 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.row < 0) return nil;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];