Skip to content

Commit

Permalink
added catch in AABB overlap detection if either is uninitialized
Browse files Browse the repository at this point in the history
  • Loading branch information
Hart, Kenneth Arthur committed Jan 21, 2019
1 parent d56daeb commit d581707
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aabbtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def overlaps(self, aabb):
Returns:
bool: Flag set to true if the two AABBs overlap
"""
if (self.limits is None) or (aabb.limits is None):
return False

for lims1, lims2 in zip(self, aabb):
min1, max1 = lims1
min2, max2 = lims2
Expand Down

0 comments on commit d581707

Please sign in to comment.