diff options
Diffstat (limited to 'cpp/src/qpid/Url.cpp')
-rw-r--r-- | cpp/src/qpid/Url.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/Url.cpp b/cpp/src/qpid/Url.cpp index 090cbb712a..20e3a55f8d 100644 --- a/cpp/src/qpid/Url.cpp +++ b/cpp/src/qpid/Url.cpp @@ -163,7 +163,8 @@ void Url::parseNoThrow(const char* url) { } void Url::throwIfEmpty() const { - throw InvalidUrl("URL contains no addresses"); + if (empty()) + throw InvalidUrl("URL contains no addresses"); } std::istream& operator>>(std::istream& is, Url& url) { |