diff --git a/oxtimelines/timeline.py b/oxtimelines/timeline.py index 30cbf25..9624a06 100644 --- a/oxtimelines/timeline.py +++ b/oxtimelines/timeline.py @@ -436,6 +436,8 @@ class Timelines(): wide = 1 if mode == 'keyframes' else self.wide frame_ratio = self.frame_ratio * wide cut_images = int(math.ceil(cut_width / (frame_ratio * self.large_tile_h))) + if cut_width == cut_images == 0: + print 'ERROR division by zerro', cut_width, cut_images image_widths = self._divide(cut_width, cut_images) image_i = self.cuts[-2] large_keyframes_tile_i = self.large_keyframes_tile_i @@ -506,6 +508,8 @@ class Timelines(): def _divide(self, num, by): # divide(100, 3) -> [33, 33, 34] arr = [] + if by == 0: + return arr div = int(num / by) mod = num % by for i in range(int(by)):