Platform collision no longer crashes if node has no parent

CURA-2443
This commit is contained in:
Jaime van Kessel 2016-09-22 14:11:44 +02:00
parent 983e963dd3
commit 4792aadc3a

View file

@ -102,7 +102,7 @@ class PlatformPhysics:
continue
# Ignore collisions within a group
if other_node.getParent().callDecoration("isGroup") is not None or node.getParent().callDecoration("isGroup") is not None:
if other_node.getParent() and node.getParent() and (other_node.getParent().callDecoration("isGroup") is not None or node.getParent().callDecoration("isGroup") is not None):
continue
# Ignore nodes that do not have the right properties set.