mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Fix error if layer number ends up out of range
It normally doesn't go out of range, but some defensive coding just in case it does. And to fix a typing error of course.
This commit is contained in:
parent
4a91425bf9
commit
371585a0ba
1 changed files with 2 additions and 0 deletions
|
@ -107,6 +107,8 @@ class FlavorParser:
|
|||
self._layer_data_builder.setLayerHeight(self._layer_number, path[0][2])
|
||||
self._layer_data_builder.setLayerThickness(self._layer_number, layer_thickness)
|
||||
this_layer = self._layer_data_builder.getLayer(self._layer_number)
|
||||
if not this_layer:
|
||||
return False
|
||||
except ValueError:
|
||||
return False
|
||||
count = len(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue