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)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index eb082b7..c18ab31 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5800,7 +5800,7 @@
if (argvars[0].v_type != VAR_UNKNOWN)
{
- wparg = win_id2wp(argvars);
+ wparg = win_id2wp(tv_get_number(&argvars[0]));
if (wparg == NULL)
return;
}