Avoid pushing unconverted values on to the list.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 8 May 2003 05:23:12 +0000 (05:23 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 8 May 2003 05:23:12 +0000 (05:23 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@412 cb58f699-b61c-0410-a6fe-9272a202ed29

shib/ScopedAttribute.cpp

index 880b8bc..68abf62 100644 (file)
@@ -157,10 +157,11 @@ Iterator<string> ScopedAttribute::getSingleByteValues() const
     if (m_sbValues.empty())
     {
         for (vector<xstring>::const_iterator i=m_scopedValues.begin(); i!=m_scopedValues.end(); i++)
-       {
-           auto_ptr<char> temp(XMLString::transcode(i->c_str()));
-           m_sbValues.push_back(temp.get());
-       }
+        {
+            auto_ptr<char> temp(XMLString::transcode(i->c_str()));
+            if (temp.get())
+                m_sbValues.push_back(temp.get());
+        }
     }
     return Iterator<string>(m_sbValues);
 }