* 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
3.0
Sha..rd 13 years ago
parent c30bc66f76
commit 8cca61b3ef
  1. 4
      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;

Loading…
Cancel
Save