mirror of https://github.com/axmolengine/axmol.git
fix bug, do not add null bones (#16948)
This commit is contained in:
parent
e4e872a065
commit
0564d43478
|
@ -53,7 +53,10 @@ MeshSkin* MeshSkin::create(Skeleton3D* skeleton, const std::vector<std::string>&
|
|||
CCASSERT(boneNames.size() == invBindPose.size(), "bone names' num should equals to invBindPose's num");
|
||||
for (const auto& it : boneNames) {
|
||||
auto bone = skeleton->getBoneByName(it);
|
||||
skin->addSkinBone(bone);
|
||||
if (bone)
|
||||
{
|
||||
skin->addSkinBone(bone);
|
||||
}
|
||||
}
|
||||
skin->_invBindPoses = invBindPose;
|
||||
skin->autorelease();
|
||||
|
|
Loading…
Reference in New Issue