Browse Source

Fixed: Erasing sibling nodes from component destructor can result in segfault.

ssinai1 8 years ago
parent
commit
ed3c298106
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Urho3D/Scene/Node.cpp

+ 1 - 1
Source/Urho3D/Scene/Node.cpp

@@ -2085,7 +2085,7 @@ void Node::UpdateWorldTransform() const
 void Node::RemoveChild(Vector<SharedPtr<Node> >::Iterator i)
 {
     // Send change event. Do not send when already being destroyed
-    Node* child = *i;
+    SharedPtr<Node> child(*i);
 
     if (Refs() > 0 && scene_)
     {