diff --git a/Runtime/Component/Comment/CommentHander.cs b/Runtime/Component/Comment/CommentHander.cs index 92c17536..f5985528 100644 --- a/Runtime/Component/Comment/CommentHander.cs +++ b/Runtime/Component/Comment/CommentHander.cs @@ -59,7 +59,7 @@ namespace XCharts.Runtime { var item = component.items[i]; var markStyle = component.GetMarkStyle(i); - if (!markStyle.show) continue; + if (markStyle == null || !markStyle.show) continue; var color = ChartHelper.IsClearColor(markStyle.lineStyle.color) ? chart.theme.axis.splitLineColor : markStyle.lineStyle.color;