fixed crashed when remove armature in frame event.

This commit is contained in:
2youyou2 2014-06-30 10:14:31 +08:00
parent 1a9e42ef85
commit aba7421ef6
1 changed files with 6 additions and 0 deletions

View File

@ -342,6 +342,12 @@ void ArmatureAnimation::update(float dt)
tween->update(dt);
}
if(_frameEventQueue.size() > 0 || _movementEventQueue.size() > 0)
{
_armature->retain();
_armature->autorelease();
}
while (_frameEventQueue.size() > 0)
{
FrameEvent *event = _frameEventQueue.front();