Fix for bug 586.
authorScott Cantor <cantor.2@osu.edu>
Thu, 9 Nov 2006 17:18:22 +0000 (17:18 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 9 Nov 2006 17:18:22 +0000 (17:18 +0000)
xmltooling/util/ParserPool.cpp

index 8a22b6e..c471335 100644 (file)
@@ -229,9 +229,10 @@ DOMInputSource* ParserPool::resolveEntity(const XMLCh* const publicId, const XML
 #else
     auto_ptr_char temp(systemId);
     map<string,string>::const_iterator i=m_schemaLocMap.find(temp.get());
-    auto_ptr_XMLCh temp2(i->second.c_str());
-    if (i!=m_schemaLocMap.end())
+    if (i!=m_schemaLocMap.end()) {
+        auto_ptr_XMLCh temp2(i->second.c_str());
         return new Wrapper4InputSource(new LocalFileInputSource(NULL,temp2.get()));
+    }
 #endif    
 
     // Shortcircuit the request.