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
This commit is contained in:
parent
6a86bf034e
commit
ce86297979
@ -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…
x
Reference in New Issue
Block a user