summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements/Form.h')
-rw-r--r--Swiften/Elements/Form.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/Elements/Form.h b/Swiften/Elements/Form.h
index 47ff7d4..0d1ed63 100644
--- a/Swiften/Elements/Form.h
+++ b/Swiften/Elements/Form.h
@@ -28,7 +28,10 @@ namespace Swift {
public:
Form(Type type = FormType) : type_(type) {}
- void addField(boost::shared_ptr<FormField> field) { fields_.push_back(field); }
+ /** Add a field to the form.
+ * @param field New field - must not be null.
+ */
+ void addField(boost::shared_ptr<FormField> field) {assert(field); fields_.push_back(field); }
const std::vector<boost::shared_ptr<FormField> >& getFields() const { return fields_; }
void setTitle(const std::string& title) { title_ = title; }
const std::string& getTitle() const { return title_; }