summaryrefslogtreecommitdiff
path: root/scene/3d/skeleton_3d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-23 12:10:09 +0200
committerGitHub <noreply@github.com>2021-09-23 12:10:09 +0200
commit011866edcd917320f4e9e0afaa548024580c4bf7 (patch)
tree52e32a505cf886a111bf06a6aacc4e4e92fd199f /scene/3d/skeleton_3d.cpp
parent2815594ba0cc86120f70ede121a0bf32ac3ee051 (diff)
parent59ff3fda7f2331719f83ce8970681bb62f8ac40f (diff)
Merge pull request #52956 from laws65/skeleton3d-bone-fix
Diffstat (limited to 'scene/3d/skeleton_3d.cpp')
-rw-r--r--scene/3d/skeleton_3d.cpp1
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;