From 6d048deba8dfb8ccb8122b6c905b08b75f5090bf Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 19 Nov 2014 20:57:22 -0800 Subject: 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. --- src/pugixml.cpp | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3