From 3411870095211f9a857428a4dbca78db8552ee56 Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Tue, 29 Dec 2015 17:15:06 +0800 Subject: [PATCH] if value is null, should not update clip --- cocos2d/core/components/CCAnimation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2d/core/components/CCAnimation.js b/cocos2d/core/components/CCAnimation.js index f5721a8c60..1dabf77190 100644 --- a/cocos2d/core/components/CCAnimation.js +++ b/cocos2d/core/components/CCAnimation.js @@ -106,7 +106,7 @@ var Animation = cc.Class({ set: function (value, force) { this._currentClip = value; - if (CC_EDITOR && force) { + if (CC_EDITOR && force && value) { this._updateClip(value); } },