set m_parent to nullptr when removing child from a container
This commit is contained in:
parent
93f7facea9
commit
7c710b1656
@ -26,6 +26,7 @@ void ContainerNode::removeChild(SceneNode* node)
|
||||
if(*it == node)
|
||||
{
|
||||
m_children.erase(it);
|
||||
node->m_parent = nullptr;
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
@ -32,8 +32,8 @@ void GraphicalContainerNode::removeChild(GraphicalNode *node)
|
||||
if(*it == node)
|
||||
{
|
||||
m_children.erase(it);
|
||||
node->m_parent = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ class btIndexedMesh;
|
||||
*/
|
||||
|
||||
class MeshNode : public GraphicalNode
|
||||
|
||||
{
|
||||
GeometryNode m_geometry;
|
||||
btIndexedMesh *bulletMesh;
|
||||
|
Loading…
x
Reference in New Issue
Block a user