diff src/usercmd.c @ 16511:4182f74e2965 v8.1.1259

patch 8.1.1259: crash when exiting early commit https://github.com/vim/vim/commit/e5c83286bb9a72cc686f2826e605eddebe3c730c Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 3 23:15:37 2019 +0200 patch 8.1.1259: crash when exiting early Problem: Crash when exiting early. (Ralf Schandl) Solution: Only pop/push the title when it was set. (closes https://github.com/vim/vim/issues/4334)
author Bram Moolenaar <Bram@vim.org>
date Fri, 03 May 2019 23:30:05 +0200
parents 854fb0ad4be6
children 81a9d0fad357
line wrap: on
line diff
--- a/src/usercmd.c
+++ b/src/usercmd.c
@@ -1045,7 +1045,8 @@ ex_command(exarg_T *eap)
 ex_comclear(exarg_T *eap UNUSED)
 {
     uc_clear(&ucmds);
-    uc_clear(&curbuf->b_ucmds);
+    if (curbuf != NULL)
+	uc_clear(&curbuf->b_ucmds);
 }
 
 /*