Problem: Using freed memory when window is closed by autocommand.
(houyunsong)
Solution: Check the window pointer is still valid.
if (wp != NULL)
{
+ if (!win_valid(wp))
+ return FALSE;
qi = GET_LOC_LIST(wp); // Location list
if (qi == NULL)
return FALSE;
only
endfunc
+func Test_autocmd_vimgrep()
+ augroup aucmd_vimgrep
+ au QuickfixCmdPre,BufNew,BufDelete,BufReadCmd * sb
+ au QuickfixCmdPre,BufNew,BufDelete,BufReadCmd * q9\0
+ augroup END
+ " TODO: if this is executed directly valgrind reports errors
+ call assert_fails('lv?a?\1f', 'E926:')
+
+ augroup aucmd_vimgrep
+ au!
+ augroup END
+endfunc
+
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2474,
/**/
2473,
/**/