Fix crash when duplicating node with support blocker

Suggested & reported by smartavonics.

Fixes #8581
This commit is contained in:
Jaime van Kessel 2020-10-20 14:19:33 +02:00
parent 2254a49c74
commit 5109bd3684
No known key found for this signature in database
GPG Key ID: 3710727397403C91

View File

@ -85,7 +85,7 @@ def findNodePlacement(nodes_to_arrange: List["SceneNode"], build_volume: "BuildV
converted_points = []
hull_polygon = node.callDecoration("getConvexHull")
if hull_polygon.getPoints() is not None: # numpy array has to be explicitly checked against None
if hull_polygon is not None and hull_polygon.getPoints() is not None: # numpy array has to be explicitly checked against None
for point in hull_polygon.getPoints():
converted_points.append(Point(point[0] * factor, point[1] * factor))
item = Item(converted_points)