dbertoni    2002/10/10 18:59:31

  Modified:    c/src/XercesParserLiaison XercesParserLiaison.cpp
  Log:
  Guard against null string.
  
  Revision  Changes    Path
  1.52      +18 -8     
xml-xalan/c/src/XercesParserLiaison/XercesParserLiaison.cpp
  
  Index: XercesParserLiaison.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XercesParserLiaison/XercesParserLiaison.cpp,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- XercesParserLiaison.cpp   3 Oct 2002 05:59:20 -0000       1.51
  +++ XercesParserLiaison.cpp   11 Oct 2002 01:59:31 -0000      1.52
  @@ -428,7 +428,7 @@
   const XalanDOMChar*
   XercesParserLiaison::getExternalSchemaLocation() const
   {
  -     return c_wstr(m_externalSchemaLocation);
  +     return m_externalSchemaLocation.length() == 0 ? 0 : 
m_externalSchemaLocation.c_str();
   }
   
   
  @@ -436,9 +436,14 @@
   void
   XercesParserLiaison::setExternalSchemaLocation(const XalanDOMChar*   
location)
   {
  -     assert(location != 0);
  -
  -     m_externalSchemaLocation = location;
  +     if (location == 0)
  +     {
  +             m_externalSchemaLocation.clear();
  +     }
  +     else
  +     {
  +             m_externalSchemaLocation = location;
  +     }
   }
   
   
  @@ -446,7 +451,7 @@
   const XalanDOMChar*
   XercesParserLiaison::getExternalNoNamespaceSchemaLocation() const
   {
  -     return c_wstr(m_externalNoNamespaceSchemaLocation);
  +     return m_externalNoNamespaceSchemaLocation.length() == 0 ? 0 : 
m_externalNoNamespaceSchemaLocation.c_str();
   }
   
   
  @@ -454,9 +459,14 @@
   void
   XercesParserLiaison::setExternalNoNamespaceSchemaLocation(const 
XalanDOMChar*        location)
   {
  -     assert(location != 0);
  -
  -     m_externalNoNamespaceSchemaLocation = location;
  +     if (location == 0)
  +     {
  +             m_externalNoNamespaceSchemaLocation.clear();
  +     }
  +     else
  +     {
  +             m_externalNoNamespaceSchemaLocation= location;
  +     }
   }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to