patch 8.0.1317: accessing freed memory in term_wait()

Problem:    Accessing freed memory in term_wait(). (Dominique Pelle)
Solution:   Check that the buffer still exists.
diff --git a/src/version.c b/src/version.c
index 99007ac..7e03c4b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1317,
+/**/
     1316,
 /**/
     1315,