updated for version 7.0g05
diff --git a/src/message.c b/src/message.c
index a242a26..aebf01b 100644
--- a/src/message.c
+++ b/src/message.c
@@ -2595,8 +2595,11 @@
 		    {
 			/* redisplay all lines */
 			screenclear();
-			for (i = 0; i < Rows - 1; ++i)
+			for (i = 0; mp != NULL && i < Rows - 1; ++i)
+			{
 			    mp = disp_sb_line(i, mp);
+			    ++msg_scrolled;
+			}
 		    }
 		    scroll = 0;
 		}