Skip to content

Commit

Permalink
Fixed force close bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
freeskys committed Oct 12, 2017
1 parent cb071ee commit 42e6f0a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions KissXML/DDXMLNode.m
Original file line number Diff line number Diff line change
Expand Up @@ -1611,10 +1611,15 @@ + (void)recursiveFixDefaultNamespacesInNode:(xmlNodePtr)node withNewRoot:(xmlNod
// Create a copy of the namespace, add to node's nsDef list, and then set as attribute's ns
xmlNsPtr attrNsCopy = xmlNewNs(NULL, attrNs->href, attrNs->prefix);

attrNsCopy->next = node->nsDef;
node->nsDef = attrNsCopy;

attr->ns = attrNsCopy;
if (attrNsCopy != NULL) {
attrNsCopy->next = node->nsDef;
node->nsDef = attrNsCopy;

attr->ns = attrNsCopy;
} else {
node->nsDef = NULL;
attr->ns = NULL;
}
}

attrNs = attrNs->next;
Expand Down

0 comments on commit 42e6f0a

Please sign in to comment.