SDK : Material editor fixed an npe in MaterialProperty when a param value was null

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10438 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 12 years ago
parent 6a86bf034e
commit ce86297979
  1. 8
      sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialProperty.java

@ -28,9 +28,11 @@ public class MaterialProperty {
public MaterialProperty(MatParam param) {
this.type = param.getVarType().name();
this.name = param.getName();
try {
this.value = param.getValueAsString();
} catch (UnsupportedOperationException e) {
if (param.getValue() != null) {
try {
this.value = param.getValueAsString();
} catch (UnsupportedOperationException e) {
}
}
}

Loading…
Cancel
Save