The problem with assertion failures is that you can't catch them the way you catch exceptions. I suggest the following lines (175+) in OgreEntity.cpp to add a check for validity of the LOD mesh:
Code: Select all
// Check if mesh is using manual LOD
if (mMesh->isLodManual())
{
ushort i, numLod;
numLod = mMesh->getNumLodLevels();
// NB skip LOD 0 which is the original
for (i = 1; i < numLod; ++i)
{
const MeshLodUsage& usage = mMesh->getLodLevel(i);
if(usage.manualMesh.isNull())
{
OGRE_EXCEPT(Exception::ERR_FILE_NOT_FOUND,
"ManualLOD file " + usage.manualName + " not found",
"Entity::_initialise");
}
else
{
// Manually create entity
Entity* lodEnt = OGRE_NEW Entity(mName + "Lod" + StringConverter::toString(i),
usage.manualMesh);
mLodEntityList.push_back(lodEnt);
}
}
}