set m_parent to nullptr when removing child from a container

This commit is contained in:
Lendemor 2016-12-09 15:47:45 +01:00
parent 93f7facea9
commit 7c710b1656
3 changed files with 2 additions and 2 deletions

View File

@ -26,6 +26,7 @@ void ContainerNode::removeChild(SceneNode* node)
if(*it == node)
{
m_children.erase(it);
node->m_parent = nullptr;
// break;
}
}

View File

@ -32,8 +32,8 @@ void GraphicalContainerNode::removeChild(GraphicalNode *node)
if(*it == node)
{
m_children.erase(it);
node->m_parent = nullptr;
}
}
}
}

View File

@ -13,7 +13,6 @@ class btIndexedMesh;
*/
class MeshNode : public GraphicalNode
{
GeometryNode m_geometry;
btIndexedMesh *bulletMesh;