* Fix NullPointerException in MaterialHelper

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7812 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
sha..rd 2011-07-02 22:20:22 +00:00
parent 14aa1dfec3
commit bffe191275
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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);