From c76ae508ffb948270f866167ac16c8bd3418e7e9 Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Tue, 22 Nov 2011 03:37:11 +0000 Subject: [PATCH] * I fixed a bug this time. For real * Reset the material list in MeshLoader so state doesn't leak. Fixed incorrect "material not found" errors git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8766 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java b/engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java index 261ed5204..731cf1412 100644 --- a/engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java +++ b/engine/src/ogre/com/jme3/scene/plugins/ogre/MeshLoader.java @@ -815,6 +815,10 @@ public class MeshLoader extends DefaultHandler implements AssetLoader { logger.log(Level.WARNING, "Cannot locate {0} for model {1}", new Object[]{materialKey, key}); } } + }else{ + // Make sure to reset it to null so that previous state + // doesn't leak onto this one + materialList = null; } // If for some reason material list could not be found through