Skip to content

Commit

Permalink
Fixed MissingReferenceException #183
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed Feb 17, 2022
1 parent 0e25a23 commit 5c2ea52
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Assets/XCharts/Runtime/Helper/CheckHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5c2ea52

Please sign in to comment.