Browse Source

Null checked additionalRenderState when loading a material

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8532 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om 14 years ago
parent
commit
2a0c4ed10f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      engine/src/core/com/jme3/material/Material.java

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

@@ -1120,7 +1120,7 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material>
                 }
                 }
             }
             }
         }
         }
-        if (guessRenderStateApply){
+        if (guessRenderStateApply && additionalState != null){
             // Try to guess values of "apply" render state based on defaults
             // Try to guess values of "apply" render state based on defaults
             // if value != default then set apply to true
             // if value != default then set apply to true
             additionalState.applyPolyOffset = additionalState.offsetEnabled;
             additionalState.applyPolyOffset = additionalState.offsetEnabled;