Skip to content

Commit

Permalink
Fix possible infinite loop in get_visible_range2()
Browse files Browse the repository at this point in the history
This is if self.iconview.get_columns() return -1
  • Loading branch information
kbengs committed May 13, 2021
1 parent 4ea9329 commit 2b3eba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdfarranger/pdfarranger.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ def get_visible_range2(self):
"""
sw_vadj = self.sw.get_vadjustment()
sw_vpos = sw_vadj.get_value()
columns_nr = self.iconview.get_columns()
columns_nr = max(self.iconview.get_columns(), 1)
sw_height = self.sw.get_allocated_height()
range_start = range_end = -1
item_nr = 0
Expand Down

0 comments on commit 2b3eba5

Please sign in to comment.