Allow null for setAnimation.

This commit is contained in:
NathanSweet 2013-09-27 11:41:14 +02:00
parent 916b7d01de
commit 18ff56549f

View File

@ -223,7 +223,7 @@ TrackEntry* AnimationState_setAnimation (AnimationState* self, int trackIndex, A
entry->animation = animation;
entry->loop = loop;
entry->time = 0;
entry->endTime = animation->duration;
entry->endTime = animation ? animation->duration : 0;
_AnimationState_setCurrent(self, trackIndex, entry);
return entry;
}