Fix possible error when a printer fails to load

CURA-1758
This commit is contained in:
fieldOfView 2016-07-21 09:55:08 +02:00
parent fa8b58844d
commit 89b601791d

View file

@ -58,7 +58,7 @@ class MachineManager(QObject):
if active_machine_id != "": if active_machine_id != "":
# An active machine was saved, so restore it. # An active machine was saved, so restore it.
self.setActiveMachine(active_machine_id) self.setActiveMachine(active_machine_id)
if self._global_container_stack.getProperty("machine_extruder_count", "value") > 1: if self._global_container_stack and self._global_container_stack.getProperty("machine_extruder_count", "value") > 1:
# Make sure _active_container_stack is properly initiated # Make sure _active_container_stack is properly initiated
ExtruderManager.getInstance().setActiveExtruderIndex(0) ExtruderManager.getInstance().setActiveExtruderIndex(0)