We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b814b3 commit fa1ca3eCopy full SHA for fa1ca3e
libxml++/document.cc
@@ -179,6 +179,9 @@ Document::Document(const Glib::ustring& version)
179
Document::Document(xmlDoc* doc)
180
: impl_(doc)
181
{
182
+ if (!impl_)
183
+ throw internal_error("xmlDoc pointer cannot be nullptr");
184
+
185
impl_->_private = this;
186
}
187
libxml++/document.h
@@ -85,6 +85,7 @@ class Document : public NonCopyable
85
* The created xmlpp::Document takes ownership of the xmlDoc.
86
* When the Document is deleted, so is the xmlDoc and all its nodes.
87
* @param doc A pointer to an xmlDoc struct. Must not be <tt>nullptr</tt>.
88
+ * @throws xmlpp::internal_error If @a doc is <tt>nullptr</tt>.
89
*/
90
explicit Document(_xmlDoc* doc);
91
0 commit comments