From: Stanislav Malyshev Date: Mon, 22 Aug 2005 13:26:33 +0000 (+0000) Subject: fix crash if throw attempted outside of executable code X-Git-Tag: php-5.1.0RC2_PRE~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33df597531c9f60cf03175920e4862cf6278e77b;p=php fix crash if throw attempted outside of executable code --- diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 591a33613b..39bbab2972 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1847,7 +1847,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML ptr = EG(current_execute_data); /* skip "new Exception()" */ - if ((skip_last == 0) && ptr->opline && (ptr->opline->opcode == ZEND_NEW)) { + if (ptr && (skip_last == 0) && ptr->opline && (ptr->opline->opcode == ZEND_NEW)) { ptr = ptr->prev_execute_data; }