From e8aab62d4d436d6ed2e089bd13d78390d1dfb68f Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sun, 24 Nov 2013 13:03:00 +0100 Subject: [PATCH] Prevent segfault when no execution context set with "b " --- phpdbg_prompt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index a2130653bf..fb6b5bc37c 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -775,7 +775,11 @@ PHPDBG_COMMAND(break) /* {{{ */ phpdbg_set_breakpoint_opline(param->addr TSRMLS_CC); break; case NUMERIC_PARAM: - phpdbg_set_breakpoint_file(phpdbg_current_file(TSRMLS_C), param->num TSRMLS_CC); + if (PHPDBG_G(exec)) { + phpdbg_set_breakpoint_file(phpdbg_current_file(TSRMLS_C), param->num TSRMLS_CC); + } else { + phpdbg_error("Execution context not set !"); + } break; case METHOD_PARAM: phpdbg_set_breakpoint_method(param->method.class, param->method.name TSRMLS_CC); -- 2.40.0