summaryrefslogtreecommitdiff
path: root/ext/dom/nodelist.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-08-13 15:02:41 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-08-13 15:02:41 +0000
commitbaff4e0ab5c831a5780d0a12b3080994965dd2dc (patch)
treeb85ebc5a7151ed2acd51249fec6d87cb01caf360 /ext/dom/nodelist.c
parent7d0b17fc671395407d35a38ee0d58f0c548dbada (diff)
downloadphp-git-baff4e0ab5c831a5780d0a12b3080994965dd2dc.tar.gz
Fixed bug #38438 (DOMNodeList->item(0) segfault on empty NodeList)
Diffstat (limited to 'ext/dom/nodelist.c')
-rw-r--r--ext/dom/nodelist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c
index 8989f907ad..268879bc16 100644
--- a/ext/dom/nodelist.c
+++ b/ext/dom/nodelist.c
@@ -134,7 +134,7 @@ PHP_FUNCTION(dom_nodelist_item)
zval_copy_ctor(return_value);
return;
}
- } else {
+ } else if (objmap->baseobj) {
nodep = dom_object_get_node(objmap->baseobj);
if (nodep) {
if (objmap->nodetype == XML_ATTRIBUTE_NODE || objmap->nodetype == XML_ELEMENT_NODE) {