浏览代码

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

Stephen Gold 1 年之前
父节点
当前提交
157ca7ae62
共有 1 个文件被更改,包括 2 次插入2 次删除
  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;
     }