Przeglądaj źródła

* Fixed NullPointerException when loading old materials that used wireframe.j3md

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7865 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..om 14 lat temu
rodzic
commit
a5d00fd003

+ 1 - 1
engine/src/core/com/jme3/material/Material.java

@@ -1031,7 +1031,7 @@ public class Material implements Cloneable, Savable, Comparable<Material> {
                 defName = "Common/MatDefs/Misc/Unshaded.j3md";
                 defName = "Common/MatDefs/Misc/Unshaded.j3md";
             }else if (defName.equalsIgnoreCase("Common/MatDefs/Misc/WireColor.j3md")){
             }else if (defName.equalsIgnoreCase("Common/MatDefs/Misc/WireColor.j3md")){
                 // Using WireColor, set wireframe renderstate = true and use Unshaded
                 // Using WireColor, set wireframe renderstate = true and use Unshaded
-                additionalState.setWireframe(true);
+                getAdditionalRenderState().setWireframe(true);
                 defName = "Common/MatDefs/Misc/Unshaded.j3md";
                 defName = "Common/MatDefs/Misc/Unshaded.j3md";
             }else if (defName.equalsIgnoreCase("Common/MatDefs/Misc/Unshaded.j3md")){
             }else if (defName.equalsIgnoreCase("Common/MatDefs/Misc/Unshaded.j3md")){
                 // Uses unshaded, ensure that the proper param is set
                 // Uses unshaded, ensure that the proper param is set