]> granicus.if.org Git - php/commitdiff
- Coverity issue 59
authorMarcus Boerger <helly@php.net>
Mon, 10 Apr 2006 23:19:23 +0000 (23:19 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 10 Apr 2006 23:19:23 +0000 (23:19 +0000)
ext/simplexml/simplexml.c

index d6e75004eb47488c7c3eaac4430f44e21d5300ca..2735dfcfdcfc4bbedddf53653cc46fbd0a42392a 100644 (file)
@@ -2055,6 +2055,9 @@ static int php_sxe_iterator_current_key(zend_object_iterator *iter, zstr *str_ke
        if (intern != NULL && intern->node != NULL) {
                curnode = (xmlNodePtr)((php_libxml_node_ptr *)intern->node)->node;
        }
+       if (!curnode) {
+               return HASH_KEY_NON_EXISTANT;
+       }
 
        if (UG(unicode)) {
                UErrorCode status = U_ZERO_ERROR;