diff --git a/Runtime/Scripts/Primitives/UILineRenderer.cs b/Runtime/Scripts/Primitives/UILineRenderer.cs index 804e3a2..590bdba 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?.Length == 0) { m_points = new Vector2[1]; }