Defend against empty location.
authorScott Cantor <cantor.2@osu.edu>
Thu, 26 Feb 2009 18:17:49 +0000 (18:17 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 26 Feb 2009 18:17:49 +0000 (18:17 +0000)
xmltooling/soap/impl/SOAPClient.cpp

index fb0ff52..9082d41 100644 (file)
@@ -57,7 +57,7 @@ void SOAPClient::reset()
 void SOAPClient::send(const Envelope& env, const SOAPTransport::Address& addr)
 {
     // Prepare a transport object.
-    const char* pch = strchr(addr.m_endpoint,':');
+    const char* pch = addr.m_endpoint ? strchr(addr.m_endpoint,':') : NULL;
     if (!pch)
         throw IOException("SOAP endpoint was not a URL.");
     string scheme(addr.m_endpoint, pch-addr.m_endpoint);