Browse Source

solve issue #2135 (ClassCastException in MTLLoader) (#2147)

Stephen Gold 1 year ago
parent
commit
157ca7ae62
1 changed files with 2 additions and 2 deletions
  1. 2 2
      jme3-core/src/plugins/java/com/jme3/scene/plugins/MTLLoader.java

+ 2 - 2
jme3-core/src/plugins/java/com/jme3/scene/plugins/MTLLoader.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2023 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -184,7 +184,7 @@ public class MTLLoader implements AssetLoader {
             logger.log(Level.WARNING, "Cannot locate {0} for material {1}", new Object[]{texKey, key});
             texture = new Texture2D(PlaceholderAssets.getPlaceholderImage(assetManager));
             texture.setWrap(WrapMode.Repeat);
-            texture.setKey(key);
+            texture.setKey(texKey);
         }
         return texture;
     }