Bugfix: NPE was raised when the object had no material.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8099 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 13 years ago
parent 87ba2fcb11
commit cb3f57009f
  1. 2
      engine/src/blender/com/jme3/scene/plugins/blender/meshes/MeshHelper.java

@ -406,7 +406,7 @@ public class MeshHelper extends AbstractBlenderHelper {
}
for(Entry<Material, List<Geometry>> entry : materialMap.entrySet()) {
MaterialContext materialContext = dataRepository.getMaterialContext(entry.getKey());
if(materialContext.getTexturesCount()>0) {
if(materialContext != null && materialContext.getTexturesCount()>0) {
UVCoordinatesGenerator.generateUVCoordinates(materialContext.getUvCoordinatesType(),
materialContext.getProjectionType(),
materialContext.getTextureDimension(), entry.getValue());

Loading…
Cancel
Save