Unay Shah

Results 2 issues of Unay Shah

- Added checks to ensure `width` and `height` are greater than zero before performing division.

- Added checks to ensure `min_row` and `max_row` are not `None` before slicing `tb.items`. - Prevents potential error when `max_row` is `None` and arithmetic is attempted.