Prevent segfault when no execution context set with "b <num>"

This commit is contained in:
Bob Weinand 2013-11-24 13:03:00 +01:00
parent 7c51efd473
commit e8aab62d4d

View file

@ -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);