fix incorrect factoring
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index 772d2ae..603be82 100755
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -809,12 +809,12 @@
 

     if ( child->_prev ) {

         child->_prev->_next = child->_next;

-        child->_prev = 0;

     }

     if ( child->_next ) {

         child->_next->_prev = child->_prev;

-        child->_next = 0;

     }

+	child->_next = 0;

+	child->_prev = 0;

 	child->_parent = 0;

 }