diff options
Diffstat (limited to 'Swiften/Serializer/XML')
-rw-r--r-- | Swiften/Serializer/XML/XMLElement.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Swiften/Serializer/XML/XMLElement.cpp b/Swiften/Serializer/XML/XMLElement.cpp index d39ec39..42b602a 100644 --- a/Swiften/Serializer/XML/XMLElement.cpp +++ b/Swiften/Serializer/XML/XMLElement.cpp @@ -52,7 +52,9 @@ void XMLElement::setAttribute(const std::string& attribute, const std::string& v } void XMLElement::addNode(boost::shared_ptr<XMLNode> node) { - childNodes_.push_back(node); + if (node) { + childNodes_.push_back(node); + } } } |