Skip to content

Commit

Permalink
Merge pull request #1244 from ousttrue/fix/throw
Browse files Browse the repository at this point in the history
Fix throw by First. Use FirstOrDefault
  • Loading branch information
PoChang007 authored Sep 29, 2021
2 parents ee8f8ce + 141076b commit 3ebced6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/VRM/Runtime/Extensions/glTF_VRMExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static glTF_VRM_BlendShapeBind Create(Transform root, BlendShapeBinding b
if (found == null)
{
var name = binding.RelativePath.Split('/').Last();
found = root.GetComponentsInChildren<Transform>().Where(x => x.name == name).First();
found = root.GetComponentsInChildren<Transform>().Where(x => x.name == name).FirstOrDefault();
if (found == null)
{
Debug.LogWarning($"{binding.RelativePath} not found");
Expand Down

0 comments on commit 3ebced6

Please sign in to comment.