소스 검색

Don't die if there is no buffer in scrollup

Jochen Sprickerhof 5 년 전
부모
커밋
bec1249f5f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scroll.c

+ 1 - 1
scroll.c

@@ -248,7 +248,7 @@ scrollup(void)
 	int rows = 0;
 
 	/* wind back bottom pointer by two pages */
-	for (; TAILQ_NEXT(bottom, entries) != NULL && rows < 2 * ws.ws_row; rows++)
+	for (; bottom != NULL && TAILQ_NEXT(bottom, entries) != NULL && rows < 2 * ws.ws_row; rows++)
 		bottom = TAILQ_NEXT(bottom, entries);
 
 	if (rows <= ws.ws_row) {