From d441130e3bbf3004434e4819ad16c553e298f1be Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 19 Mar 2024 10:43:11 +0100 Subject: [PATCH] Defensive programming: Fix current path can be None. should fix CURA-11741 (sentry cura '708') --- plugins/SimulationView/SimulationPass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/SimulationView/SimulationPass.py b/plugins/SimulationView/SimulationPass.py index efe80162b5..f779224203 100644 --- a/plugins/SimulationView/SimulationPass.py +++ b/plugins/SimulationView/SimulationPass.py @@ -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.