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());