summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-19 20:57:22 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-19 20:57:22 -0800
commit6d048deba8dfb8ccb8122b6c905b08b75f5090bf (patch)
treebdf980ddec06bfd15ee0cb541ec7c37f0484dd84
parentc579d99649bae59aaf5344e3d428201113fab1e9 (diff)
Make sure remove_node fully detaches the node
Right now remove_node is only used in contexts where parent is reset after removing but this might be important in the future.
-rw-r--r--src/pugixml.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 961e5f3..194c77d 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -711,6 +711,7 @@ PUGI__NS_BEGIN
else
parent->first_child = node->next_sibling;
+ node->parent = 0;
node->prev_sibling_c = 0;
node->next_sibling = 0;
}