diff --git a/cocos2d/core/textures/CCTexture2D.js b/cocos2d/core/textures/CCTexture2D.js index 263d09e32f..bcbc64152e 100644 --- a/cocos2d/core/textures/CCTexture2D.js +++ b/cocos2d/core/textures/CCTexture2D.js @@ -415,7 +415,7 @@ var Texture2D = cc.Class({ */ destroy () { this._image = null; - this._texture.destroy(); + this._texture && this._texture.destroy(); // TODO cc.textureUtil ? // cc.textureCache.removeTextureForKey(this.url); // item.rawUrl || item.url this._super(); @@ -506,7 +506,7 @@ var Texture2D = cc.Class({ */ releaseTexture () { this._image = null; - this._texture.destroy(); + this._texture && this._texture.destroy(); }, /**