Mercurial > vim
diff src/ex_cmds2.c @ 11645:50f2a4ad1cfa v8.0.0705
patch 8.0.0705: crash when there is an error in a timer callback
commit https://github.com/vim/vim/commit/cae24be4a808d60313913cc6feea6c2bee2e2a42
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 10 22:12:10 2017 +0200
patch 8.0.0705: crash when there is an error in a timer callback
Problem: Crash when there is an error in a timer callback. (Aron Griffis,
Ozaki Kiichi)
Solution: Check did_throw before discarding an exception. NULLify
current_exception when no longer valid.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 10 Jul 2017 22:15:03 +0200 |
parents | 71d7b5ed08a0 |
children | f87c43fca41d |
line wrap: on
line diff
--- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1235,7 +1235,7 @@ check_due_timer(void) if (called_emsg) { ++timer->tr_emsg_count; - if (!did_throw_save && current_exception != NULL) + if (!did_throw_save && did_throw && current_exception != NULL) discard_current_exception(); } did_emsg = did_emsg_save;