1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Catch errors from buildBones

This commit is contained in:
Chris Robinson 2013-01-06 20:05:50 -08:00
parent 910619eb21
commit 7ba09ff025

View File

@ -367,7 +367,14 @@ void loadResource(Ogre::Resource *resource)
const Nif::Node *node = dynamic_cast<const Nif::Node*>(nif.getRecord(0));
std::vector<Nif::NiKeyframeController*> ctrls;
buildBones(skel, node, ctrls);
try {
buildBones(skel, node, ctrls);
}
catch(std::exception &e) {
std::cerr<< "Exception while loading "<<skel->getName() <<std::endl;
std::cerr<< e.what() <<std::endl;
return;
}
std::vector<std::string> targets;
// TODO: If ctrls.size() == 0, check for a .kf file sharing the name of the .nif file