From 1c3b22cf052c6ac392d2b42ebd5cf8db377b2851 Mon Sep 17 00:00:00 2001
From: Tinny Ng <tng@apache.org>
Date: Thu, 4 Jan 2001 21:37:46 +0000
Subject: [PATCH] Assertion `size > 0' failure when cloning a node if the last
 attributes has been removed.  Fixed by Khaled Noaman.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@172490 13f79535-47bb-0310-9956-ffa450edef68
---
 src/dom/NamedNodeMapImpl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dom/NamedNodeMapImpl.cpp b/src/dom/NamedNodeMapImpl.cpp
index 56038f804..64cbe8093 100644
--- a/src/dom/NamedNodeMapImpl.cpp
+++ b/src/dom/NamedNodeMapImpl.cpp
@@ -435,7 +435,7 @@ void NamedNodeMapImpl::setOwnerDocument(DocumentImpl *doc) {
 
 
 void NamedNodeMapImpl::cloneContent(NamedNodeMapImpl *srcmap) {
-	if ((srcmap != null) && (srcmap->nodes != null))
+   if ((srcmap != null) && (srcmap->nodes != null) && (srcmap->nodes->size() > 0))
 	{
 		if (nodes != null)
 			delete nodes;
-- 
GitLab