Skip to content

Commit

Permalink
Merge pull request #1508 from javapriyan/main
Browse files Browse the repository at this point in the history
Fixing NPE while the current page is empty
  • Loading branch information
bitwiseman committed Sep 2, 2022
2 parents 7a99258 + 7b6c326 commit 319e943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/PagedIterator.java
Expand Up @@ -72,7 +72,7 @@ protected void wrapUp(T[] page) {
*/
public boolean hasNext() {
fetch();
return currentPage.length > nextItemIndex;
return (currentPage != null && currentPage.length > nextItemIndex);
}

/**
Expand Down

0 comments on commit 319e943

Please sign in to comment.