diff src/evalfunc.c @ 15770:77e97f159554 v8.1.0892

patch 8.1.0892: failure when closing a window when location list is in use commit https://github.com/vim/vim/commit/eeb1b9c7ed33c152e041a286d79bf3ed00d80e40 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 10 22:59:04 2019 +0100 patch 8.1.0892: failure when closing a window when location list is in use Problem: Failure when closing a window when location list is in use. Solution: Handle the situation gracefully. Make sure memory for 'switchbuf' is not freed at the wrong time. (Yegappan Lakshmanan, closes #3928)
author Bram Moolenaar <Bram@vim.org>
date Sun, 10 Feb 2019 23:00:05 +0100
parents 93b78c4a7cd5
children c4efa095f323
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5800,7 +5800,7 @@ f_getwininfo(typval_T *argvars, typval_T
 
     if (argvars[0].v_type != VAR_UNKNOWN)
     {
-	wparg = win_id2wp(argvars);
+	wparg = win_id2wp(tv_get_number(&argvars[0]));
 	if (wparg == NULL)
 	    return;
     }