summaryrefslogtreecommitdiff
path: root/ext/simplexml
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2010-12-27 21:47:52 +0000
committerAntony Dovgal <tony2001@php.net>2010-12-27 21:47:52 +0000
commitc4a5af24e0a82128dc0f277e0fbfe3478edbe73b (patch)
tree65ec99ec0f4e9857460b343871e5ddc0d6390e23 /ext/simplexml
parent6fab69a17d70c97d4b002b7af6d1e70f9eb68c20 (diff)
downloadphp-git-c4a5af24e0a82128dc0f277e0fbfe3478edbe73b.tar.gz
fix segfault when node is NULL
Diffstat (limited to 'ext/simplexml')
-rw-r--r--ext/simplexml/simplexml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index cbde980c04..124121d1f0 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;