From d581707f360965ae4252e05c000778fb5e1ea5a7 Mon Sep 17 00:00:00 2001 From: "Hart, Kenneth Arthur" Date: Mon, 21 Jan 2019 00:54:19 -0500 Subject: [PATCH] added catch in AABB overlap detection if either is uninitialized --- aabbtree.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aabbtree.py b/aabbtree.py index eb66615..8bb685b 100644 --- a/aabbtree.py +++ b/aabbtree.py @@ -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