Skip to content

Commit

Permalink
Merge pull request #642 from voxel51/bugfix/iss-641
Browse files Browse the repository at this point in the history
Handle empty polylines
  • Loading branch information
brimoor authored Jan 1, 2025
2 parents f45e571 + f2c2d50 commit 9bff4d4
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 9bff4d4

Please sign in to comment.