fixes issue https://github.com/jMonkeyEngine/jmonkeyengine/issues/506 : Material->toString() does not prevent/check for possible NPEs

cleanup_build_scripts
jjYBdx4IL 9 years ago committed by Rémy Bouquet
parent 95bf9efe9b
commit cfd491e270
  1. 4
      jme3-core/src/main/java/com/jme3/material/Material.java

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

Loading…
Cancel
Save