소스 검색

Fixed vector path overlay crash

Krzysztof Krysiński 1 개월 전
부모
커밋
06c50f4c44
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      src/PixiEditor/Views/Overlays/PathOverlay/VectorPathOverlay.cs

+ 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;