* Fix NullPointerException in MaterialHelper

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7812 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 14 years ago
parent 14aa1dfec3
commit bffe191275
  1. 6
      engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/MaterialHelper.java
  2. 2
      engine/src/test/jme3test/model/anim/TestCustomAnim.java

@ -252,10 +252,12 @@ public class MaterialHelper extends AbstractBlenderHelper {
Structure tex = pTex.fetchData(dataRepository.getInputStream()).get(0);
Texture texture = textureHelper.getTexture(tex, dataRepository);
// NOTE: Enable mipmaps FOR ALL TEXTURES EVER
texture.setMinFilter(MinFilter.Trilinear);
if (texture != null) {
// NOTE: Enable mipmaps FOR ALL TEXTURES EVER
texture.setMinFilter(MinFilter.Trilinear);
if ((mapto & 0x01) != 0) {// Col
// Map to COLOR channel or DIFFUSE
// Set diffuse to white so it doesn't get multiplied by texture

@ -120,7 +120,7 @@ public class TestCustomAnim extends SimpleApplication {
model.attachChild(geom);
// Create skeleton control
SkeletonControl skeletonControl = new SkeletonControl(new Mesh[]{ box }, skeleton);
SkeletonControl skeletonControl = new SkeletonControl(skeleton);
model.addControl(skeletonControl);
rootNode.attachChild(model);

Loading…
Cancel
Save