Skip to content

Commit

Permalink
SmooList Sonar fix again
Browse files Browse the repository at this point in the history
  • Loading branch information
farmerbriantee committed Jan 31, 2022
1 parent 3ff4092 commit 4b775d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SourceCode/GPS/Classes/CABCurve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ public void SmoothAB(int smPts)
int cnt = refList.Count;

//just go back if not very long
if (!isCurveSet || cnt < 400) return;
if (!isCurveSet || cnt < 200) return;

//the temp array
vec3[] arr = new vec3[cnt];
Expand Down Expand Up @@ -787,6 +787,9 @@ public void SmoothAB(int smPts)

//make a list to draw
smooList?.Clear();

if (arr == null || cnt < 1) return;

for (int i = 0; i < cnt; i++)
{
smooList.Add(arr[i]);
Expand Down

0 comments on commit 4b775d8

Please sign in to comment.