diff --git a/Runtime/Scripts/Primitives/UILineRenderer.cs b/Runtime/Scripts/Primitives/UILineRenderer.cs index 590bdba..6f2f093 100644 --- a/Runtime/Scripts/Primitives/UILineRenderer.cs +++ b/Runtime/Scripts/Primitives/UILineRenderer.cs @@ -466,7 +466,7 @@ namespace UnityEngine.UI.Extensions protected override void OnEnable() { base.OnEnable(); - if (m_points?.Length == 0) + if (m_points == null || m_points?.Length == 0) { m_points = new Vector2[1]; }