Projects > cpp > Issues > Bug #4462

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Wrong logic in CCBAnimationManager::moveAnimationsFromNode

Bug #4462 [Closed]
dumganhar 2014-03-20 09:25 . Updated over 10 years ago

Reported at http://www.cocos2d-x.org/forums/6/topics/44682

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
void CCBAnimationManager::moveAnimationsFromNode(Node* fromNode, Node* to)
{
auto baseValueIter = _baseValues.find(fromNode);

if(baseValueIter != _baseValues.end())
{
    _baseValues.erase(baseValueIter);  // After erase baseValueIter, baseValueIter->second will be invalid.
    _baseValues[toNode] = baseValueIter->second;
}

auto objIter = _objects.find(fromNode);
if (objIter != _objects.end())
{
    _objects.erase(objIter);  // After erase objIter, objIter->second will be invalid.
    _objects[toNode] = objIter->second;
}

auto seqsIter = _nodeSequences.find(fromNode);
if (seqsIter != _nodeSequences.end())
{
    _nodeSequences.erase(seqsIter); // After erase seqsIter, seqsIter->second will be invalid.
    _nodeSequences[toNode] = seqsIter->second;
}
}
dumganhar 2014-03-21 10:04
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:9c9bba3db13c3007792738c9c890493296f6d328.

Atom PDF

Status:Closed
Start date:2014-03-20
Priority:Normal
Due date:
Assignee:dumganhar
% Done:

100%

Category:all
Target version:3.0-rc1