Explorar o código

Merge pull request #507 from jjYBdx4IL/master

fixes issue https://github.com/jMonkeyEngine/jmonkeyengine/issues/506…
empirephoenix %!s(int64=9) %!d(string=hai) anos
pai
achega
65164e2075
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      jme3-core/src/main/java/com/jme3/material/Material.java

+ 2 - 2
jme3-core/src/main/java/com/jme3/material/Material.java

@@ -992,8 +992,8 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
     @Override
     public String toString() {
         return "Material[name=" + name + 
-                ", def=" + def.getName() + 
-                ", tech=" + technique.getDef().getName() + 
+                ", def=" + (def != null ? def.getName() : null) + 
+                ", tech=" + (technique != null && technique.getDef() != null ? technique.getDef().getName() : null) + 
                 "]";
     }