You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Gareth Reakes <ga...@decisionsoft.com> on 2000/12/12 16:26:41 UTC
null pointer bug
If attributes is null we break.
Fix is below
--- Xerces-cvs/xml-xerces/c/src/dom/ElementImpl.cpp Tue Dec 12
15:20:54
2000
+++ 1.1/devel/Xerces1_3/src/dom/ElementImpl.cpp Tue Dec 12 15:21:52 2000
@@ -55,7 +55,7 @@
*/
/*
- * $Id: ElementImpl.cpp,v 1.26 2000/08/17 22:47:09 lehors Exp $
+ * $Id: ElementImpl.cpp,v 1.26 2000/08/17 13:17:47 gareth Exp $
*/
#include "DeepNodeListImpl.hpp"
@@ -339,7 +339,7 @@
AttrImpl *ElementImpl::getAttributeNodeNS(const DOMString &fNamespaceURI,
const DOMString &fLocalName)
{
- return (AttrImpl *)(attributes->getNamedItemNS(fNamespaceURI,
fLocalName));
+ return (attributes == 0) ? null : (AttrImpl
*)(attributes->getNamedItemNS(fNamespaceURI, fLocalName));
}