updated for version 7.0-220
diff --git a/src/eval.c b/src/eval.c
index 4698024..93d0394 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -15769,7 +15769,15 @@
     if (nr > 0)
 	for (wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
 					      wp != twin; wp = wp->w_next)
+	{
+	    if (wp == NULL)
+	    {
+		/* didn't find it in this tabpage */
+		nr = 0;
+		break;
+	    }
 	    ++nr;
+	}
     return nr;
 }
 #endif
diff --git a/src/version.c b/src/version.c
index d58ae29..e223c49 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    220,
+/**/
     219,
 /**/
     218,