patch 8.2.3762: if quickfix buffer is wiped out getqflist() still returns it

Problem:    If the quickfix buffer is wiped out getqflist() still returns its
            number.
Solution:   Use zero if the buffer is no longer present. (Yegappan Lakshmanan,
            closes #9306)
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index b242ac5..940b4d6 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -4626,6 +4626,13 @@
   call assert_equal(qfbnum, bufnr(''))
   Xclose
 
+  " When quickfix buffer is wiped out, getqflist() should return 0
+  %bw!
+  Xexpr ""
+  Xopen
+  bw!
+  call assert_equal(0, g:Xgetlist({'qfbufnr': 0}).qfbufnr)
+
   if a:cchar == 'l'
     %bwipe
     " For a location list, when both the file window and the location list