diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-08-16 08:27:13 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-08-16 11:20:12 (GMT) |
commit | f33cb9f04e2b6629a56ec32ba4f6345a8acda2f1 (patch) | |
tree | bdafddc0c19d40d636514e6b19e889128ed3b7d2 /Swiften/JID | |
parent | ee8a386eab3a2d061ff91e22798b7251ca3f05ae (diff) | |
download | swift-f33cb9f04e2b6629a56ec32ba4f6345a8acda2f1.zip swift-f33cb9f04e2b6629a56ec32ba4f6345a8acda2f1.tar.bz2 |
Don't allow passing NULL to the JID ctor
Change-Id: I5e0cf477632927e5383b60b7dd8922740a9b5d5d
Diffstat (limited to 'Swiften/JID')
-rw-r--r-- | Swiften/JID/JID.cpp | 1 | ||||
-rw-r--r-- | Swiften/JID/JID.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/JID/JID.cpp b/Swiften/JID/JID.cpp index 7b51867..e1502f1 100644 --- a/Swiften/JID/JID.cpp +++ b/Swiften/JID/JID.cpp @@ -132,6 +132,7 @@ struct EscapedCharacterFormatter { namespace Swift { JID::JID(const char* jid) : valid_(true) { + assert(jid); initializeFromString(std::string(jid)); } diff --git a/Swiften/JID/JID.h b/Swiften/JID/JID.h index 798860d..eac1e2a 100644 --- a/Swiften/JID/JID.h +++ b/Swiften/JID/JID.h @@ -47,6 +47,8 @@ namespace Swift { /** * See std::string constructor. + * + * Must not be NULL. */ JID(const char*); |