mirror of
https://github.com/zxing/zxing.git
synced 2025-01-13 04:07:27 -08:00
Double-check to avoid exception clicking on stale item
git-svn-id: https://zxing.googlecode.com/svn/trunk@2261 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
8f461afd09
commit
9ad25e25b7
|
@ -40,7 +40,11 @@ final class BrowseBookListener implements AdapterView.OnItemClickListener {
|
||||||
// Clicked header, ignore it
|
// Clicked header, ignore it
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String pageId = items.get(position - 1).getPageId();
|
int itemOffset = position - 1;
|
||||||
|
if (itemOffset >= items.size()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String pageId = items.get(itemOffset).getPageId();
|
||||||
String query = SearchBookContentsResult.getQuery();
|
String query = SearchBookContentsResult.getQuery();
|
||||||
if (LocaleManager.isBookSearchUrl(activity.getISBN()) && pageId.length() > 0) {
|
if (LocaleManager.isBookSearchUrl(activity.getISBN()) && pageId.length() > 0) {
|
||||||
String uri = activity.getISBN();
|
String uri = activity.getISBN();
|
||||||
|
|
Loading…
Reference in a new issue