patch 8.0.0502: Coverity complains about possible NULL pointer

Problem:    Coverity complains about possible NULL pointer.
Solution:   Add an assert(), let's see if this works on all systems.
diff --git a/src/version.c b/src/version.c
index a1edd07..4b2ff6f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    502,
+/**/
     501,
 /**/
     500,
diff --git a/src/window.c b/src/window.c
index eed0ea9..2ef3198 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3806,6 +3806,7 @@
 	for (ptp = first_tabpage; ptp != NULL && ptp->tp_next != tab;
 							    ptp = ptp->tp_next)
 	    ;
+	assert(ptp != NULL);
 	ptp->tp_next = tab->tp_next;
     }