diff --git a/cocos2d/core/components/CCComponent.js b/cocos2d/core/components/CCComponent.js index fc2df0d6a3..c95728c27e 100644 --- a/cocos2d/core/components/CCComponent.js +++ b/cocos2d/core/components/CCComponent.js @@ -510,7 +510,9 @@ var Component = cc.Class({ this.node._removeComponent(this); if (CC_EDITOR || CC_TEST) { - delete cc.engine.attachedObjsForEditor[this._id]; + if (cc.engine.attachedObjsForEditor[this._id] === this) { // temporarily fix + delete cc.engine.attachedObjsForEditor[this._id]; + } } },