diff options
author | Michael Stahl <mst@openoffice.org> | 2011-01-19 20:27:14 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2011-01-19 20:27:14 +0100 |
commit | 8f5bbf5b121339f21c3859b8476a994c4cfc841a (patch) | |
tree | 0d260bb09fa61a14f8065d34cb99b2d517385ae0 /unoxml/source/dom/element.cxx | |
parent | 6145d8c3f4a4da41b3fb2ad16627fd1f9d81fd5f (diff) |
xmlfix3: #i113663#: unoxml: fix xmlRemoveProp errors
Diffstat (limited to 'unoxml/source/dom/element.cxx')
-rw-r--r-- | unoxml/source/dom/element.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index 7de79e39e3e4..e116f3883e5d 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -380,7 +380,8 @@ namespace DOM Reference< XAttr > aAttr; if(m_aNodePtr != NULL) { - xmlAttrPtr pAttr = (xmlAttrPtr) CNode::getNodePtr(oldAttr.get()); + xmlNodePtr const pNode = CNode::getNodePtr(oldAttr.get()); + xmlAttrPtr const pAttr = (xmlAttrPtr) pNode; if (pAttr->parent != m_aNodePtr) { @@ -402,7 +403,8 @@ namespace DOM aAttr = oldAttr->getOwnerDocument()->createAttribute(oldAttr->getName()); aAttr->setValue(oldAttr->getValue()); xmlRemoveProp(pAttr); - + CNode *const pCNode( CNode::get(pNode) ); + pCNode->m_aNodePtr = NULL; // freed by xmlRemoveProp } return aAttr; } |