Skip to content

Commit

Permalink
fix crash if throw attempted outside of executable code
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Aug 22, 2005
1 parent daa2092 commit 33df597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Zend/zend_builtin_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 33df597

Please sign in to comment.