diff options
author | Ghostkeeper <rubend@tutanota.com> | 2020-09-02 04:21:11 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2020-09-02 04:21:11 +0300 |
commit | 59bf1c10af35ac7b2ac5a750a57b643efbb0969f (patch) | |
tree | 2609074f959d61f35278ac87b001abc04db40bff | |
parent | 323be4deffad91f187687ddb164a6f97ff994753 (diff) |
Account for the fact that global_stack may be empty
You should not have any models in your scene then though. But oh well. It also fixes the typing.
Contributes to issue CURA-7118.
-rw-r--r-- | cura/Scene/ConvexHullDecorator.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py index 898e3546dd..bca3cdc240 100644 --- a/cura/Scene/ConvexHullDecorator.py +++ b/cura/Scene/ConvexHullDecorator.py @@ -381,7 +381,8 @@ class ConvexHullDecorator(SceneNodeDecorator): :return: New Polygon instance that is offset with everything that influences the collision area. """ - + if not self._global_stack: # Should never happen. + return convex_hull scale_factor = self._global_stack.getProperty("material_shrinkage_percentage", "value") / 100.0 result = convex_hull if scale_factor != 1.0: |