]> granicus.if.org Git - php/commitdiff
- Fix crash when instantiating MultipleIterator
authorFelipe Pena <felipe@php.net>
Mon, 10 May 2010 01:39:58 +0000 (01:39 +0000)
committerFelipe Pena <felipe@php.net>
Mon, 10 May 2010 01:39:58 +0000 (01:39 +0000)
ext/spl/spl_observer.c

index b0ef609f08e3aee1561feae3ac818e55fc18a088..757be4704a4be657c440edd7e8ec3f04659905bf 100755 (executable)
@@ -274,7 +274,7 @@ static zend_object_value spl_object_storage_new_ex(zend_class_entry *class_type,
 
        if (class_type != spl_ce_SplObjectStorage) {
                zend_hash_find(&class_type->function_table, "gethash",    sizeof("gethash"),    (void **) &intern->fptr_get_hash);
-               if (intern->fptr_get_hash->common.scope == spl_ce_SplObjectStorage) {
+               if (intern->fptr_get_hash && intern->fptr_get_hash->common.scope == spl_ce_SplObjectStorage) {
                        intern->fptr_get_hash = NULL;
                }
        }