Skip to content

Commit

Permalink
Merge pull request #10008 from keveleigh/2.7.1-cherrypicks
Browse files Browse the repository at this point in the history
Add early return if array length is 0
  • Loading branch information
keveleigh committed Jun 21, 2021
2 parents 0c813f5 + 9b12b12 commit aaef3ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ private Vector2[] InitializeUVs(Vector3[] neutralPoseVertices)
{
if (neutralPoseVertices.Length == 0)
{
Debug.LogError("Loaded 0 verts for neutralPoseVertices");
Debug.LogError("Loaded 0 vertices for neutralPoseVertices");
return System.Array.Empty<Vector2>();
}

float minY = neutralPoseVertices[0].y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ private void InitializeUVs(Vector3[] poseVertices)
{
if (poseVertices.Length == 0)
{
Debug.LogError("Loaded 0 verts for poseVertices");
Debug.LogError("Loaded 0 vertices for poseVertices");
return System.Array.Empty<Vector2>();
}

float minY = poseVertices[0].y;
Expand Down

0 comments on commit aaef3ae

Please sign in to comment.