Skip to content

Commit faf647d

Browse files
author
arch
committed
fix program crash when get_edge_ponts sequence is empty
1 parent 6869f3a commit faf647d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

funscript_editor/algorithms/signal.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ def get_edge_points(self, signal: list, base_points: list, threshold: float = 25
283283
for j in range(base_points[i], base_points[i+1])
284284
]
285285

286+
if len(distances) == 0:
287+
continue
288+
286289
max_distance = max(distances)
287290

288291
if overall_max_distance < max_distance:

0 commit comments

Comments
 (0)