mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Defensive programming: Fix current path can be None.
should fix CURA-11741 (sentry cura '708')
This commit is contained in:
parent
22d860f4e2
commit
d441130e3b
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ class SimulationPass(RenderPass):
|
|||
# In the current layer, we show just the indicated paths
|
||||
if layer == self._layer_view._current_layer_num:
|
||||
# We look for the position of the head, searching the point of the current path
|
||||
index = int(self._layer_view.getCurrentPath())
|
||||
index = int(self._layer_view.getCurrentPath()) if self._layer_view.getCurrentPath() else 0
|
||||
for polygon in layer_data.getLayer(layer).polygons:
|
||||
# The size indicates all values in the two-dimension array, and the second dimension is
|
||||
# always size 3 because we have 3D points.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue