diff options
Diffstat (limited to 'python/libxml.c')
-rw-r--r-- | python/libxml.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/libxml.c b/python/libxml.c index ad8ac7c..88b29cf 100644 --- a/python/libxml.c +++ b/python/libxml.c @@ -2323,13 +2323,13 @@ static PyObject * libxml_properties(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) { PyObject *resultobj, *obj; - xmlNodePtr cur = NULL; + xmlNodePtr cur; xmlAttrPtr res; if (!PyArg_ParseTuple(args, (char *) "O:properties", &obj)) return NULL; cur = PyxmlNode_Get(obj); - if (cur->type == XML_ELEMENT_NODE) + if ((cur != NULL) && (cur->type == XML_ELEMENT_NODE)) res = cur->properties; else res = NULL; |