From a717a5e50ffdb1c9feb3f30281cc41ea86c08038 Mon Sep 17 00:00:00 2001 From: javasabr Date: Mon, 27 Nov 2017 10:24:54 +0300 Subject: [PATCH] fixed NPE during loading shader node material without vertex nodes. --- .../src/main/java/com/jme3/material/ShaderGenerationInfo.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java b/jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java index dda02c67c..3a42ee328 100644 --- a/jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java +++ b/jme3-core/src/main/java/com/jme3/material/ShaderGenerationInfo.java @@ -206,7 +206,9 @@ public class ShaderGenerationInfo implements Savable, Cloneable { clone.vertexUniforms.add(uniform.clone()); } - clone.vertexGlobal = vertexGlobal.clone(); + if (vertexGlobal != null) { + clone.vertexGlobal = vertexGlobal.clone(); + } for (ShaderNodeVariable varying : varyings) { clone.varyings.add(varying.clone());