From 33df597531c9f60cf03175920e4862cf6278e77b Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 22 Aug 2005 13:26:33 +0000 Subject: fix crash if throw attempted outside of executable code --- Zend/zend_builtin_functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend_builtin_functions.c') 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; } -- cgit v1.2.1