Don't update next stack if there is no next stack

Not all extruder stacks have a next stack. Well currently every extruder stack should have a next stack, but the code is built around the possibility that there isn't a next stack elsewhere too.

Contributes to issue CURA-4121.
This commit is contained in:
Ghostkeeper 2017-08-07 09:47:53 +02:00
parent 584e1b6abb
commit cf1309c650
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75

View File

@ -91,6 +91,8 @@ class ExtruderStack(CuraContainerStack):
# When there is a setting that is not settable per extruder that depends on a value from a setting that is,
# we do not always get properly informed that we should re-evaluate the setting. So make sure to indicate
# something changed for those settings.
if not self.getNextStack():
return #There are no global settings to depend on.
definitions = self.getNextStack().definition.findDefinitions(key = key)
if definitions:
has_global_dependencies = False