Merge pull request #765 from 2youyouo2/anim

fixed fromVal maybe null
This commit is contained in:
Jare Guo
2016-06-03 16:49:00 +08:00
+1 -2
View File
@@ -104,8 +104,7 @@ var DynamicAnimCurve = cc.Class({
value = fromVal + (toVal - fromVal) * ratio;
}
else {
var lerp = fromVal.lerp;
if (lerp) {
if (fromVal && fromVal.lerp) {
value = fromVal.lerp(toVal, ratio);
}
else {