1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-06-15 06:41:48 +03:00

fixing bug #98792 , node may have no doc and dereferencing without

* python/libxml.c: fixing bug #98792 , node may have no doc
  and dereferencing without checking ain't good ...
Daniel
This commit is contained in:
Daniel Veillard
2002-11-17 22:37:35 +00:00
parent dad3f680e5
commit a8c0adbc39
2 changed files with 6 additions and 1 deletions

View File

@ -1995,7 +1995,7 @@ libxml_serializeNode(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
py_retval = libxml_charPtrWrap((char *) c_retval);
} else {
doc = node->doc;
if (doc->type == XML_DOCUMENT_NODE) {
if ((doc == NULL) || (doc->type == XML_DOCUMENT_NODE)) {
xmlOutputBufferPtr buf;
xmlCharEncodingHandlerPtr handler = NULL;