mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 08:39:42 +00:00
Avoid crash when no bones are available
This commit is contained in:
parent
696861349e
commit
9ee83caaa2
1 changed files with 5 additions and 0 deletions
|
@ -643,6 +643,11 @@ void NIFLoader::handleNiTriShape(NiTriShape *shape, int flags, BoundsFinder &bou
|
||||||
for (std::vector<NiSkinData::BoneInfo>::iterator it = boneList.begin();
|
for (std::vector<NiSkinData::BoneInfo>::iterator it = boneList.begin();
|
||||||
it != boneList.end(); it++)
|
it != boneList.end(); it++)
|
||||||
{
|
{
|
||||||
|
if(mSkel.isNull())
|
||||||
|
{
|
||||||
|
std::cout << "No skeleton for :" << shape->skin->bones[boneIndex].name.toString() << std::endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
//get the bone from bones array of skindata
|
//get the bone from bones array of skindata
|
||||||
bonePtr = mSkel->getBone(shape->skin->bones[boneIndex].name.toString());
|
bonePtr = mSkel->getBone(shape->skin->bones[boneIndex].name.toString());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue