Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Check whether avatar is humanoid before trying to access it's bones.
Browse files Browse the repository at this point in the history
  • Loading branch information
RequiDev committed Sep 24, 2021
1 parent 43c31f4 commit 3f67f65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ReModCE/Components/DynamicBonesComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,9 @@ private void ToggleDynamicBones(bool value)

private void AddBoneCollider(List<DynamicBoneCollider> list, Animator animator, List<HumanBodyBones> bones)
{
if (animator == null) return;
if (!animator.isHuman)
return;

foreach (var bone in bones)
{
foreach (var collider in animator.GetBoneTransform(bone).GetComponentsInChildren<DynamicBoneCollider>(true))
Expand Down

0 comments on commit 3f67f65

Please sign in to comment.