From 4fbf99e4b58cecd5cc8a958fb27b39082aa3ae94 Mon Sep 17 00:00:00 2001 From: knoxHuang <821686174@qq.com> Date: Tue, 23 May 2017 16:33:13 +0800 Subject: [PATCH] async Load Assets caused MASK to be invalid for fireball/issues/5802 --- cocos2d/core/components/CCMask.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cocos2d/core/components/CCMask.js b/cocos2d/core/components/CCMask.js index ac7c90ab6d..63654c63d8 100644 --- a/cocos2d/core/components/CCMask.js +++ b/cocos2d/core/components/CCMask.js @@ -248,6 +248,9 @@ var Mask = cc.Class({ onEnable: function () { this._super(); + if (this.spriteFrame) { + this.spriteFrame.ensureLoadTexture(); + } this.node.on('size-changed', this._refreshStencil, this); this.node.on('anchor-changed', this._refreshStencil, this); },