From 1e4b2b1ee68865eaa0670a21ad0a0af1777c8099 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Fri, 16 Aug 2013 09:27:13 +0100
Subject: Don't allow passing NULL to the JID ctor

Change-Id: I5e0cf477632927e5383b60b7dd8922740a9b5d5d

diff --git a/Swiften/JID/JID.cpp b/Swiften/JID/JID.cpp
index 0822595..f195f6f 100644
--- a/Swiften/JID/JID.cpp
+++ b/Swiften/JID/JID.cpp
@@ -112,6 +112,7 @@ struct EscapedCharacterFormatter {
 #endif
 
 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 08309d3..779610b 100644
--- a/Swiften/JID/JID.h
+++ b/Swiften/JID/JID.h
@@ -45,6 +45,8 @@ namespace Swift {
 
 			/**
 			 * See std::string constructor.
+			 *
+			 * Must not be NULL.
 			 */
 			JID(const char*);
 
-- 
cgit v0.10.2-6-g49f6