From: Ilia Alshanetsky Date: Mon, 10 Oct 2005 14:31:12 +0000 (+0000) Subject: MFH: Fixed bug #34802 (Fixed crash on object instantiation failure). X-Git-Tag: php-5.1.0RC2~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58a0906bf96212ca8b0c1f8c8c5d074bfbe40246;p=php MFH: Fixed bug #34802 (Fixed crash on object instantiation failure). --- diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 9dedba20b2..b3b618256b 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -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); } }