Skip to content

Commit

Permalink
handle empty polylines
Browse files Browse the repository at this point in the history
  • Loading branch information
brimoor committed Dec 29, 2024
1 parent f45e571 commit f2c2d50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eta/core/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,11 @@ def render_bounding_box(polyline):
Returns:
a BoundingBox
"""
xx, yy = zip(*list(itertools.chain(*polyline.points)))
try:
xx, yy = zip(*list(itertools.chain(*polyline.points)))
except ValueError:
return etag.BoundingBox.empty()

xtl = min(xx)
ytl = min(yy)
xbr = max(xx)
Expand Down

0 comments on commit f2c2d50

Please sign in to comment.