]> granicus.if.org Git - php/commitdiff
fix crash if throw attempted outside of executable code
authorStanislav Malyshev <stas@php.net>
Mon, 22 Aug 2005 13:26:33 +0000 (13:26 +0000)
committerStanislav Malyshev <stas@php.net>
Mon, 22 Aug 2005 13:26:33 +0000 (13:26 +0000)
Zend/zend_builtin_functions.c

index 591a33613b07bbaea5a950376e17ac238c405aaf..39bbab297288224b81054246ce9369396043c7ca 100644 (file)
@@ -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;
        }