diff --git a/Assets/XCharts/Runtime/Helper/CheckHelper.cs b/Assets/XCharts/Runtime/Helper/CheckHelper.cs index d579f67f..f9cb20dd 100644 --- a/Assets/XCharts/Runtime/Helper/CheckHelper.cs +++ b/Assets/XCharts/Runtime/Helper/CheckHelper.cs @@ -18,12 +18,18 @@ private static bool IsColorAlphaZero(Color color) public static string CheckChart(BaseGraph chart) { - if (chart is BaseChart) return CheckChart((BaseChart)chart); - else return string.Empty; + if(chart == null) + return string.Empty; + if (chart is BaseChart) + return CheckChart((BaseChart)chart); + else + return string.Empty; } public static string CheckChart(BaseChart chart) { + if(chart == null) + return string.Empty; var sb = ChartHelper.sb; sb.Length = 0; CheckName(chart, sb);