diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-10-09 02:13:49 +0100 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-13 21:15:24 +0800 |
commit | a25c35d6e409398a8d8304210784e020c262aec5 (patch) | |
tree | c23b6cf9253f9ccc8da6eb14286ea88ede3fb4fc /src/nvim/ex_eval.c | |
parent | 93c72d866b3a41c429dd9d278cda7059ebd4afba (diff) | |
download | rneovim-a25c35d6e409398a8d8304210784e020c262aec5.tar.gz rneovim-a25c35d6e409398a8d8304210784e020c262aec5.tar.bz2 rneovim-a25c35d6e409398a8d8304210784e020c262aec5.zip |
vim-patch:8.2.3470: crash with error in :catch and also in :finally
Problem: Crash with error in :catch and also in :finally.
Solution: Only discard an exception if there is one. (closes vim/vim#8954)
https://github.com/vim/vim/commit/a684a684096ecef3fbaee39c573b47423235d6b1
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r-- | src/nvim/ex_eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index 3c7c635d98..d9c14f143e 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -1913,7 +1913,7 @@ int cleanup_conditionals(cstack_T *cstack, int searched_cond, int inclusive) default: if (cstack->cs_flags[idx] & CSF_FINALLY) { - if (cstack->cs_pending[idx] & CSTP_THROW) { + if ((cstack->cs_pending[idx] & CSTP_THROW) && cstack->cs_exception[idx] != NULL) { // Cancel the pending exception. This is in the // finally clause, so that the stack of the // caught exceptions is not involved. |