RenderTexture: Texture is always destroyed (canvas)

Forgot to check the flag for canvas renderer.
This commit is contained in:
TadejZupancic 2018-08-22 15:57:57 +02:00 committed by GitHub
parent bd40360dbc
commit 1fa16f00df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -829,7 +829,7 @@ var RenderTexture = new Class({
*/ */
preDestroy: function () preDestroy: function ()
{ {
if (this.canvas) if (this.canvas && !this._saved)
{ {
CanvasPool.remove(this.canvas); CanvasPool.remove(this.canvas);
} }