]> granicus.if.org Git - vim/commitdiff
patch 8.2.1820: Vim9: crash when error happens in timer callback v8.2.1820
authorBram Moolenaar <Bram@vim.org>
Sat, 10 Oct 2020 13:05:23 +0000 (15:05 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 10 Oct 2020 13:05:23 +0000 (15:05 +0200)
Problem:    Vim9: crash when error happens in timer callback.
Solution:   Check that current_exception is not NULL. (closes #7100)

src/ex_docmd.c
src/version.c

index 05378fdcd7a1daa3f1a4e5bb4e74091f72925726..310934ed71efe274caf007675d65fe33bca1c39f 100644 (file)
@@ -1234,6 +1234,10 @@ do_cmdline(
 
     if (trylevel == 0)
     {
+       // Just in case did_throw got set but current_exception wasn't.
+       if (current_exception == NULL)
+           did_throw = FALSE;
+
        /*
         * When an exception is being thrown out of the outermost try
         * conditional, discard the uncaught exception, disable the conversion
index a953c099b8a7ab5ebb7860be0ec561d52a689a4d..8e2115e5d3beaa7e104de0a891a6d0ce22ac8cf4 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1820,
 /**/
     1819,
 /**/