Skip to content

Commit

Permalink
fix crash if none frame returned (#203)
Browse files Browse the repository at this point in the history
Co-authored-by: gferraro <g.ferraro22@gmail.com>
  • Loading branch information
gferraro and gferraro authored May 19, 2024
1 parent 4d33643 commit c8155e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ml_tools/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ def preprocess_segments(
for frame_index in frame_indices:
region = track.bounds_history[frame_index - track.start_frame]
f = clip.get_frame(region.frame_number)
if f is None:
logging.warn("Could not get frame {}", region.frame_number)
continue
if region.blank or region.width <= 0 or region.height <= 0:
continue

Expand Down

0 comments on commit c8155e2

Please sign in to comment.