CURA-4482 Fix error in SolidView when the support angle stack doesn't

exist. This error was sent twice through the CrashHandler and it is in Metabase.
This commit is contained in:
Diego Prado Gesto 2017-11-28 09:39:57 +01:00
parent 0e2f60f18b
commit 49537b64f7

View file

@ -49,9 +49,9 @@ class SolidView(View):
global_container_stack = Application.getInstance().getGlobalContainerStack()
if global_container_stack:
support_extruder_nr = global_container_stack.getProperty("support_extruder_nr", "value")
support_angle_stack = ExtruderManager.getInstance().getExtruderStack(support_extruder_nr)
support_angle_stack = Application.getInstance().getExtruderManager().getExtruderStack(support_extruder_nr)
if Preferences.getInstance().getValue("view/show_overhang"):
if support_angle_stack is not None and Preferences.getInstance().getValue("view/show_overhang"):
angle = support_angle_stack.getProperty("support_angle", "value")
# Make sure the overhang angle is valid before passing it to the shader
# Note: if the overhang angle is set to its default value, it does not need to get validated (validationState = None)