mirror of https://github.com/axmolengine/axmol.git
fixed crashed when remove armature in frame event.
This commit is contained in:
parent
1a9e42ef85
commit
aba7421ef6
|
@ -342,6 +342,12 @@ void ArmatureAnimation::update(float dt)
|
||||||
tween->update(dt);
|
tween->update(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(_frameEventQueue.size() > 0 || _movementEventQueue.size() > 0)
|
||||||
|
{
|
||||||
|
_armature->retain();
|
||||||
|
_armature->autorelease();
|
||||||
|
}
|
||||||
|
|
||||||
while (_frameEventQueue.size() > 0)
|
while (_frameEventQueue.size() > 0)
|
||||||
{
|
{
|
||||||
FrameEvent *event = _frameEventQueue.front();
|
FrameEvent *event = _frameEventQueue.front();
|
||||||
|
|
Loading…
Reference in New Issue