From e29988e30cb8ffe60ade1e3c5b2115c896909f6b Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Sat, 2 May 2015 15:24:22 -0400 Subject: [PATCH] Image: fix cloning for last texture state --- jme3-core/src/main/java/com/jme3/texture/Image.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/texture/Image.java b/jme3-core/src/main/java/com/jme3/texture/Image.java index 96ab62819..52f311e98 100644 --- a/jme3-core/src/main/java/com/jme3/texture/Image.java +++ b/jme3-core/src/main/java/com/jme3/texture/Image.java @@ -375,7 +375,7 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ { // attributes relating to GL object protected boolean mipsWereGenerated = false; protected boolean needGeneratedMips = false; - protected final LastTextureState lastTextureState = new LastTextureState(); + protected LastTextureState lastTextureState = new LastTextureState(); /** * Internal use only. @@ -490,6 +490,7 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ { Image clone = (Image) super.clone(); clone.mipMapSizes = mipMapSizes != null ? mipMapSizes.clone() : null; clone.data = data != null ? new ArrayList(data) : null; + clone.lastTextureState = new LastTextureState(); clone.setUpdateNeeded(); return clone; }