From f4221121f6c53900192586dafcd4e4250bd90cc4 Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Wed, 17 Feb 2016 11:44:34 +0800 Subject: [PATCH] fixed reset defaultClip --- cocos2d/core/components/CCAnimation.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos2d/core/components/CCAnimation.js b/cocos2d/core/components/CCAnimation.js index f8edaef626..757f9f77ab 100644 --- a/cocos2d/core/components/CCAnimation.js +++ b/cocos2d/core/components/CCAnimation.js @@ -81,6 +81,10 @@ var Animation = cc.Class({ this._defaultClip = value; + if (!value) { + return; + } + var clips = this._clips; for (var i = 0, l = clips.length; i < l; i++) {