From c6d0b49b894c77bd72ae07d2bbea1f2fac0efd9c Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Mon, 19 Oct 2020 15:37:48 +0300 Subject: [PATCH] Additional check for existence of row in heightForRowAt indexPath --- Source/Core/Core.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/Core.swift b/Source/Core/Core.swift index 9d649fe31..dc5687bd3 100644 --- a/Source/Core/Core.swift +++ b/Source/Core/Core.swift @@ -793,6 +793,7 @@ extension FormViewController : UITableViewDelegate { open func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { guard tableView == self.tableView else { return tableView.rowHeight } + guard indexPath.row < form[indexPath.section].count else { return tableView.rowHeight } let row = form[indexPath.section][indexPath.row] return row.baseCell.height?() ?? tableView.rowHeight }