patch 7.4.2021
Problem:    Still too many buf_valid() calls.
Solution:   Make au_new_curbuf a bufref.  Use bufref_valid() in more places.
diff --git a/src/globals.h b/src/globals.h
index 879255c..566d6e1 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -386,7 +386,7 @@
 
 /* When deleting the current buffer, another one must be loaded.  If we know
  * which one is preferred, au_new_curbuf is set to it */
-EXTERN buf_T	*au_new_curbuf INIT(= NULL);
+EXTERN bufref_T	au_new_curbuf INIT(= {NULL});
 
 /* When deleting a buffer/window and autocmd_busy is TRUE, do not free the
  * buffer/window. but link it in the list starting with