From ce862979791fd90fe35c86e80bb38f52f0f141ee Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Tue, 26 Feb 2013 19:54:17 +0000 Subject: [PATCH] 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 --- .../src/com/jme3/gde/materials/MaterialProperty.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialProperty.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialProperty.java index 553b3655e..2bbb986e0 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materials/MaterialProperty.java +++ b/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) { + } } }