You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/01/17 22:15:23 UTC

cvs commit: xml-xerces/c/src/dom ElementImpl.cpp

tng         01/01/17 13:15:22

  Modified:    c/src/dom ElementImpl.cpp
  Log:
  ElementImpl::getAttributeNS should check null pointer.  Fixed by Volker Krause.
  
  Revision  Changes    Path
  1.28      +4 -3      xml-xerces/c/src/dom/ElementImpl.cpp
  
  Index: ElementImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/ElementImpl.cpp,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ElementImpl.cpp	2000/12/12 19:23:29	1.27
  +++ ElementImpl.cpp	2001/01/17 21:15:16	1.28
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: ElementImpl.cpp,v 1.27 2000/12/12 19:23:29 lehors Exp $
  + * $Id: ElementImpl.cpp,v 1.28 2001/01/17 21:15:16 tng Exp $
    */
    
   #include "DeepNodeListImpl.hpp"
  @@ -287,8 +287,9 @@
   DOMString ElementImpl::getAttributeNS(const DOMString &fNamespaceURI,
   	const DOMString &fLocalName)
   {
  -    AttrImpl * attr=
  -      (AttrImpl *)(attributes->getNamedItemNS(fNamespaceURI, fLocalName));
  +    AttrImpl * attr= (attributes != null) ?
  +      (AttrImpl *)(attributes->getNamedItemNS(fNamespaceURI, fLocalName))
  +    : null;
       return (attr==null) ? DOMString(null) : attr->getValue();
   }