From 8cca61b3ef5054373b068fe73014ca00e4cee94b Mon Sep 17 00:00:00 2001 From: "Sha..rd" Date: Mon, 9 Jan 2012 04:49:34 +0000 Subject: [PATCH] * Fixed crash in blender loader when given textures without extension git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9013 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jme3/scene/plugins/blender/textures/TextureHelper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java b/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java index 2248efdd3..aea26e472 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/textures/TextureHelper.java @@ -796,6 +796,10 @@ public class TextureHelper extends AbstractBlenderHelper { * @return the loaded image or null if the image cannot be found */ protected Texture loadTextureFromFile(String name, BlenderContext blenderContext) { + if (!name.contains(".")){ + return null; // no extension means not a valid image + } + AssetManager assetManager = blenderContext.getAssetManager(); name = name.replaceAll("\\\\", "\\/"); Texture result = null;