SecurityViewController: Improve null safety check for keybackup section cells.

This commit is contained in:
SBiOSoftWhare
2020-09-28 16:21:41 +02:00
parent cd875ae5b6
commit d77811f54f

View File

@@ -1664,14 +1664,30 @@ TableViewSectionsDelegate>
- (MXKTableViewCellWithTextView *)settingsKeyBackupTableViewSection:(SettingsKeyBackupTableViewSection *)settingsKeyBackupTableViewSection textCellForRow:(NSInteger)textCellForRow
{
MXKTableViewCellWithTextView *cell;
NSIndexPath *indexPath = [self.tableViewSections exactIndexPathForRowTag:textCellForRow sectionTag:SECTION_KEYBACKUP];
return [self textViewCellForTableView:self.tableView atIndexPath:indexPath];
if (indexPath)
{
cell = [self textViewCellForTableView:self.tableView atIndexPath:indexPath];
}
return cell;
}
- (MXKTableViewCellWithButton *)settingsKeyBackupTableViewSection:(SettingsKeyBackupTableViewSection *)settingsKeyBackupTableViewSection buttonCellForRow:(NSInteger)buttonCellForRow
{
MXKTableViewCellWithButton *cell;
NSIndexPath *indexPath = [self.tableViewSections exactIndexPathForRowTag:buttonCellForRow sectionTag:SECTION_KEYBACKUP];
return [self buttonCellForTableView:self.tableView atIndexPath:indexPath];
if (indexPath)
{
[self buttonCellForTableView:self.tableView atIndexPath:indexPath];
}
return cell;
}
- (void)settingsKeyBackupTableViewSectionShowKeyBackupSetup:(SettingsKeyBackupTableViewSection *)settingsKeyBackupTableViewSection