From cb3f57009fae2f724e004b972a81814756a73cf0 Mon Sep 17 00:00:00 2001 From: "Kae..pl" Date: Thu, 25 Aug 2011 20:58:39 +0000 Subject: [PATCH] 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 --- .../com/jme3/scene/plugins/blender/meshes/MeshHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/meshes/MeshHelper.java b/engine/src/blender/com/jme3/scene/plugins/blender/meshes/MeshHelper.java index bce42d8f2..af8f032e9 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/meshes/MeshHelper.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/meshes/MeshHelper.java @@ -406,7 +406,7 @@ public class MeshHelper extends AbstractBlenderHelper { } for(Entry> 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());