diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-23 12:10:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-23 12:10:09 +0200 |
commit | 011866edcd917320f4e9e0afaa548024580c4bf7 (patch) | |
tree | 52e32a505cf886a111bf06a6aacc4e4e92fd199f /scene | |
parent | 2815594ba0cc86120f70ede121a0bf32ac3ee051 (diff) | |
parent | 59ff3fda7f2331719f83ce8970681bb62f8ac40f (diff) |
Merge pull request #52956 from laws65/skeleton3d-bone-fix
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/skeleton_3d.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index 0f5de621ea..b7a79a2645 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -520,6 +520,7 @@ void Skeleton3D::set_bone_parent(int p_bone, int p_parent) { const int bone_size = bones.size(); ERR_FAIL_INDEX(p_bone, bone_size); ERR_FAIL_COND(p_parent != -1 && (p_parent < 0)); + ERR_FAIL_COND(p_bone == p_parent); bones.write[p_bone].parent = p_parent; process_order_dirty = true; |