Do not try to validate against machine_extruder_count when there is no machine_extruder_count

This commit is contained in:
Arjen Hiemstra 2017-04-10 17:52:17 +02:00
parent 73779eef25
commit 09e5765f22

View file

@ -33,7 +33,7 @@ class GlobalStack(CuraContainerStack):
def addExtruder(self, extruder):
extruder_count = self.getProperty("machine_extruder_count", "value")
if len(self._extruders) + 1 > extruder_count:
if extruder_count and len(self._extruders) + 1 > extruder_count:
raise Exceptions.TooManyExtrudersError("Tried to add extruder to {id} but its extruder count is {count}".format(id = self.id, count = extruder_count))
self._extruders.append(extruder)