diff --git a/Editor/BezierLineRendererEditor.cs b/Editor/BezierLineRendererEditor.cs index d3ab130..7689f3d 100644 --- a/Editor/BezierLineRendererEditor.cs +++ b/Editor/BezierLineRendererEditor.cs @@ -12,7 +12,7 @@ namespace UnityEngine.UI.Extensions { UILineRenderer curveRenderer = target as UILineRenderer; - if (!curveRenderer && curveRenderer.Points.Length < 2) + if (!curveRenderer || curveRenderer.Points == null || curveRenderer.Points.Length < 2) { return; }