Skip to content

Commit 1fa16f0

Browse files
RenderTexture: Texture is always destroyed (canvas)
Forgot to check the flag for canvas renderer.
1 parent bd40360 commit 1fa16f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/gameobjects/rendertexture/RenderTexture.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ var RenderTexture = new Class({
829829
*/
830830
preDestroy: function ()
831831
{
832-
if (this.canvas)
832+
if (this.canvas && !this._saved)
833833
{
834834
CanvasPool.remove(this.canvas);
835835
}

0 commit comments

Comments
 (0)