@@ -1090,14 +1090,19 @@ public void handleNextItems(final ListExtractor.InfoItemsPage<?> result) {
10901090 showListFooter (false );
10911091 infoListAdapter .addInfoItemList (result .getItems ());
10921092
1093- // nextPage should not be null here because it refers to the page
1094- // which results are handled here, but we check it anyway
1095- if (!result .getErrors ().isEmpty () && nextPage != null ) {
1096- showSnackBarError (new ErrorInfo (result .getErrors (), UserAction .SEARCHED ,
1097- "\" " + searchString + "\" → pageUrl: " + nextPage .getUrl () + ", "
1098- + "pageIds: " + nextPage .getIds () + ", "
1099- + "pageCookies: " + nextPage .getCookies (),
1100- serviceId ));
1093+ if (!result .getErrors ().isEmpty ()) {
1094+ // nextPage should be non-null at this point, because it refers to the page
1095+ // whose results are handled here, but let's check it anyway
1096+ if (nextPage == null ) {
1097+ showSnackBarError (new ErrorInfo (result .getErrors (), UserAction .SEARCHED ,
1098+ "\" " + searchString + "\" → nextPage == null" , serviceId ));
1099+ } else {
1100+ showSnackBarError (new ErrorInfo (result .getErrors (), UserAction .SEARCHED ,
1101+ "\" " + searchString + "\" → pageUrl: " + nextPage .getUrl () + ", "
1102+ + "pageIds: " + nextPage .getIds () + ", "
1103+ + "pageCookies: " + nextPage .getCookies (),
1104+ serviceId ));
1105+ }
11011106 }
11021107
11031108 // keep the reassignment of nextPage after the error handling to ensure that nextPage
0 commit comments