From 26ef85ce6fe2eeb62a9d8859baf3e08852351fc3 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Sat, 12 Nov 2022 08:19:51 +0800 Subject: [PATCH] [fix][comment] fix null error for comment --- Runtime/Component/Comment/CommentHander.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;