From 59bf1c10af35ac7b2ac5a750a57b643efbb0969f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 2 Sep 2020 03:21:11 +0200 Subject: [PATCH] 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. --- cura/Scene/ConvexHullDecorator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: