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

index 9dedba20b24fa6f5bd8e7ca7905512d8e32db90c..b3b618256ba785db52a59448cbef7ca469665392 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);
                                }
                        }