* Ogre Importer: No longer crashes if submesh name index is out of bounds. Fix issue 548.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10566 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
ada98f7033
commit
a31c8ec884
@ -600,7 +600,12 @@ public class MeshLoader extends DefaultHandler implements AssetLoader {
|
||||
|
||||
private void startSubmeshName(String indexStr, String nameStr) {
|
||||
int index = Integer.parseInt(indexStr);
|
||||
geoms.get(index).setName(nameStr);
|
||||
if (geoms.size() >= index) {
|
||||
logger.log(Level.WARNING, "Submesh name index is larger than number of geometries: {0} >= {1}",
|
||||
new Object[]{index, geoms.size()});
|
||||
} else {
|
||||
geoms.get(index).setName(nameStr);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user