Skip to content

Commit 319e943

Browse files
authored
Merge pull request #1508 from javapriyan/main
Fixing NPE while the current page is empty
2 parents 7a99258 + 7b6c326 commit 319e943

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/kohsuke/github/PagedIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected void wrapUp(T[] page) {
7272
*/
7373
public boolean hasNext() {
7474
fetch();
75-
return currentPage.length > nextItemIndex;
75+
return (currentPage != null && currentPage.length > nextItemIndex);
7676
}
7777

7878
/**

0 commit comments

Comments
 (0)