Don't crash when updating material list without global container

There is nothing to update then.

Contributes to issue CURA-5045.
This commit is contained in:
Ghostkeeper 2018-03-27 09:39:10 +02:00
parent 74a0da14bf
commit 75e993eb60
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -1115,6 +1115,8 @@ class MachineManager(QObject):
self._setQualityGroup(candidate_quality_groups[quality_type], empty_quality_changes = True)
def _updateMaterialWithVariant(self, position: Optional[str]):
if self._global_container_stack is None:
return
if position is None:
position_list = list(self._global_container_stack.extruders.keys())
else: