We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3cc17f5 + bff7f99 commit 17a9fd1Copy full SHA for 17a9fd1
1 file changed
src/gameobjects/rendertexture/RenderTexture.js
@@ -161,6 +161,8 @@ var RenderTexture = new Class({
161
162
// Get the frame
163
this.frame = this.texture.get();
164
+
165
+ this._saved = false;
166
167
/**
168
* An internal Camera that can be used to move around the Render Texture.
@@ -350,6 +352,8 @@ var RenderTexture = new Class({
350
352
saveTexture: function (key)
351
353
{
354
this.textureManager.renameTexture(this.texture.key, key);
355
356
+ this._saved = true;
357
358
return this.texture;
359
},
@@ -835,7 +839,10 @@ var RenderTexture = new Class({
835
839
this.renderer.deleteFramebuffer(this.framebuffer);
836
840
}
837
841
838
- this.texture.destroy();
842
+ if (!this._saved)
843
+ {
844
+ this.texture.destroy();
845
+ }
846
847
848
});
0 commit comments