From Daniel Stien, "When removing a child from a osg::Group, childRemoved is called after the

node has already been erased from the node list, causing childRemoved to be
performed on the consecutive node.

Lines 180 and 182 are swapped in the attached Group.cpp.
"
This commit is contained in:
Robert Osfield 2008-01-14 10:14:32 +00:00
parent 2d407a8c0c
commit 4b05e84d59

View File

@ -177,10 +177,10 @@ bool Group::removeChildren(unsigned int pos,unsigned int numChildrenToRemove)
}
_children.erase(_children.begin()+pos,_children.begin()+endOfRemoveRange);
childRemoved(pos,endOfRemoveRange-pos);
_children.erase(_children.begin()+pos,_children.begin()+endOfRemoveRange);
if (updateCallbackRemoved)
{
setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()-updateCallbackRemoved);