]> granicus.if.org Git - php/commitdiff
Fixed bug #34802 (Fixed crash on object instantiation failure).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 10 Oct 2005 14:30:05 +0000 (14:30 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 10 Oct 2005 14:30:05 +0000 (14:30 +0000)
Zend/zend_objects_API.c

index 74caaba5fa3d96df1b1e9c63723848717aa75c09..6f929b0e10b25538476ddb8a590417f66dd70a21 100644 (file)
@@ -51,7 +51,7 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS
 
                        if (!objects->object_buckets[i].destructor_called) {
                                objects->object_buckets[i].destructor_called = 1;
-                               if (obj->dtor) {
+                               if (obj->dtor && obj->object) {
                                        obj->dtor(obj->object, i TSRMLS_CC);
                                }
                        }