瀏覽代碼

End dragging null check

Krzysztof Krysiński 4 月之前
父節點
當前提交
cf860a0909
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/PixiEditor/Views/Animations/Timeline.cs

+ 2 - 2
src/PixiEditor/Views/Animations/Timeline.cs

@@ -300,9 +300,9 @@ internal class Timeline : TemplatedControl, INotifyPropertyChanged
     {
         if (dragged)
         {
-            if (draggedKeyFrames.Length > 0)
+            if (draggedKeyFrames is { Length: > 0 })
             {
-                ChangeKeyFramesLengthCommand.Execute((draggedKeyFrames.ToArray(), 0, true));
+                ChangeKeyFramesLengthCommand?.Execute((draggedKeyFrames.ToArray(), 0, true));
             }
         }