diff src/eval.c @ 1094:c50ed526966a v7.0.220

updated for version 7.0-220
author vimboss
date Sun, 25 Mar 2007 15:49:08 +0000
parents 25154b22dc96
children 4c8b90b7a94a
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -15769,7 +15769,15 @@ get_winnr(tp, argvar)
     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