From 107123820bed1fd215566d3e3edad7cb84e1d304 Mon Sep 17 00:00:00 2001 From: Nehon Date: Thu, 17 Mar 2016 14:02:12 +0100 Subject: [PATCH] Fixed material exporting NPE when the additionalRenderState is null --- .../material/plugin/export/material/J3MRootOutputCapsule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jme3-plugins/src/main/java/com/jme3/material/plugin/export/material/J3MRootOutputCapsule.java b/jme3-plugins/src/main/java/com/jme3/material/plugin/export/material/J3MRootOutputCapsule.java index 06461d86a..40130b705 100644 --- a/jme3-plugins/src/main/java/com/jme3/material/plugin/export/material/J3MRootOutputCapsule.java +++ b/jme3-plugins/src/main/java/com/jme3/material/plugin/export/material/J3MRootOutputCapsule.java @@ -91,7 +91,9 @@ public class J3MRootOutputCapsule extends J3MOutputCapsule { @Override public void write(Savable object, String name, Savable defVal) throws IOException { - object.write(exporter); + if(object != null && !object.equals(defVal)) { + object.write(exporter); + } } }