diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/creator/creator_args.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index 5b976515dd8..fe67eff3c40 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -1615,6 +1615,7 @@ static int arg_handle_python_file_run(int argc, const char **argv, void *data) BPY_CTX_SETUP(ok = BPY_execute_filepath(C, filename, NULL)); if (!ok && app_state.exit_code_on_error.python) { printf("\nError: script failed, file: '%s', exiting.\n", argv[1]); + BPY_python_end(); exit(app_state.exit_code_on_error.python); } return 1; @@ -1656,6 +1657,7 @@ static int arg_handle_python_text_run(int argc, const char **argv, void *data) if (!ok && app_state.exit_code_on_error.python) { printf("\nError: script failed, text: '%s', exiting.\n", argv[1]); + BPY_python_end(); exit(app_state.exit_code_on_error.python); } @@ -1687,6 +1689,7 @@ static int arg_handle_python_expr_run(int argc, const char **argv, void *data) BPY_CTX_SETUP(ok = BPY_execute_string_ex(C, NULL, argv[1], false)); if (!ok && app_state.exit_code_on_error.python) { printf("\nError: script failed, expr: '%s', exiting.\n", argv[1]); + BPY_python_end(); exit(app_state.exit_code_on_error.python); } return 1; |