diff --git a/jme3-core/src/main/java/com/jme3/scene/Spatial.java b/jme3-core/src/main/java/com/jme3/scene/Spatial.java index d0369ca3c..d912b34b3 100644 --- a/jme3-core/src/main/java/com/jme3/scene/Spatial.java +++ b/jme3-core/src/main/java/com/jme3/scene/Spatial.java @@ -1530,6 +1530,9 @@ public abstract class Spatial implements Savable, Cloneable, Collidable, Cloneab if(data == null){ userData.remove(key); + if(userData.isEmpty()) { + userData = null; + } }else if (data instanceof Savable) { userData.put(key, (Savable) data); } else {