summaryrefslogtreecommitdiff
path: root/python/libxml.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2006-04-29 21:57:40 +0200
committerMike Hommey <glandium@debian.org>2006-04-29 21:57:40 +0200
commit07a67fa4bcc1b8bf2651ab41e5fc54a05059cf7e (patch)
tree7b377fd8e804a983cb2c57a43be1093ef179c5fd /python/libxml.c
parentc5d565931c4823dc8f62fffcb65aecfec516f7b9 (diff)
downloadlibxml2-07a67fa4bcc1b8bf2651ab41e5fc54a05059cf7e.tar.gz
Load /tmp/libxml2-2.6.24 intoupstream/2.6.24.dfsg
libxml2/branches/upstream/current.
Diffstat (limited to 'python/libxml.c')
-rw-r--r--python/libxml.c4
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;