updated for version 7.3.715
Problem:    Crash when calling setloclist() in BufUnload autocmd. (Marcin
            Szamotulski)
Solution:   Set w_llist to NULL when it was freed.  Also add a test.
            (Christian Brabandt)
diff --git a/src/testdir/test49.vim b/src/testdir/test49.vim
index 5e24e30..d17ea54 100644
--- a/src/testdir/test49.vim
+++ b/src/testdir/test49.vim
@@ -9603,9 +9603,28 @@
 
 Xcheck 198689
 
+"-------------------------------------------------------------------------------
+" Test 86   setloclist crash						    {{{1
+"
+"	    Executing a setloclist() on BufUnload shouldn't crash Vim
+"-------------------------------------------------------------------------------
+
+func F
+    au BufUnload * :call setloclist(0, [{'bufnr':1, 'lnum':1, 'col':1, 'text': 'tango down'}])
+
+    :lvimgrep /.*/ *
+endfunc
+
+XpathINIT
+
+ExecAsScript F
+
+delfunction F
+Xout  "No Crash for vimgrep on BufUnload"
+Xcheck 0 
 
 "-------------------------------------------------------------------------------
-" Test 86:  $VIMNOERRTHROW and $VIMNOINTTHROW support			    {{{1
+" Test 87:  $VIMNOERRTHROW and $VIMNOINTTHROW support			    {{{1
 "
 "	    It is possible to configure Vim for throwing exceptions on error
 "	    or interrupt, controlled by variables $VIMNOERRTHROW and