Explorar el Código

Fixed vector path overlay crash

Krzysztof Krysiński hace 1 mes
padre
commit
06c50f4c44

+ 1 - 3
src/PixiEditor/Views/Overlays/PathOverlay/VectorPathOverlay.cs

@@ -148,11 +148,9 @@ public class VectorPathOverlay : Overlay
                 }
 
                 var handle = anchorHandles[anchorIndex];
-                var nextIndex = subPath.GetNextPoint(anchorIndex).Index;
+                var nextIndex = subPath.GetNextPoint(anchorIndex)?.Index ?? 0;
                 bool nextIsSelected = nextIndex < anchorHandles.Count &&
                                       anchorHandles[nextIndex].IsSelected;
-                bool previousIsSelected = anchorIndex - 1 >= 0 &&
-                                          anchorHandles[anchorIndex - 1].IsSelected;
                 bool drawControl1 = handle.IsSelected;
                 bool drawControl2 = nextIsSelected;