patch 8.0.1402: crash with nasty autocommand

Problem:    Crash with nasty autocommand. (gy741, Dominique Pelle)
Solution:   Check that the new current buffer isn't wiped out. (closes #2447)
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index bf106f3..8ac8811 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -1163,3 +1163,11 @@
   unlet g:event
   bwipe!
 endfunc
+
+func Test_nocatch_wipe_all_buffers()
+  " Real nasty autocommand: wipe all buffers on any event.
+  au * * bwipe *
+  call assert_fails('next x', 'E93')
+  bwipe
+  au!
+endfunc