mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
OSX copmpatibility tweak.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39239 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cd9dfc915e
commit
a725edd38b
3 changed files with 21 additions and 7 deletions
|
@ -657,10 +657,16 @@ extern void ensure_oldNs(xmlNodePtr node);
|
|||
NSAssert(NSXMLNamespaceKind != theKind, NSInvalidArgumentException);
|
||||
NSAssert(NSXMLNotationDeclarationKind != theKind, NSInvalidArgumentException);
|
||||
|
||||
if (nil != [child parent])
|
||||
{
|
||||
[child detach];
|
||||
}
|
||||
/* On OSX we get NSInternalInconsistencyException if we try to add an element
|
||||
* which is already a child of some other parent. So presumably we shouldn't
|
||||
* be auto-removing...
|
||||
*
|
||||
* if (nil != [child parent])
|
||||
* {
|
||||
* [child detach];
|
||||
* }
|
||||
*/
|
||||
NSAssert(nil == [child parent], NSInternalInconsistencyException);
|
||||
|
||||
[self _insertChild: child atIndex: index];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue