diff options
author | Antony Dovgal <tony2001@php.net> | 2010-12-27 21:47:52 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2010-12-27 21:47:52 +0000 |
commit | 874954ed97e0328adf57470230f7f16552ba225c (patch) | |
tree | ac316bd36b7ce98541b5fe9cef7c3a0ab8b6cffc /ext/simplexml/simplexml.c | |
parent | ae0e5a0c8c458347160de293851e88cc2e881414 (diff) | |
download | php-git-874954ed97e0328adf57470230f7f16552ba225c.tar.gz |
fix segfault when node is NULL
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r-- | ext/simplexml/simplexml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index d767b5bf89..51961472f7 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1099,7 +1099,7 @@ static HashTable * sxe_get_prop_hash(zval *object, int is_debug TSRMLS_DC) /* {{ if (sxe->iter.type == SXE_ITER_ELEMENT) { node = php_sxe_get_first_node(sxe, node TSRMLS_CC); } - if (node->type != XML_ENTITY_DECL) { + if (!node || node->type != XML_ENTITY_DECL) { attr = node ? (xmlAttrPtr)node->properties : NULL; zattr = NULL; test = sxe->iter.name && sxe->iter.type == SXE_ITER_ATTRLIST; |