Fix possible index out of bounds exception in ConversationAdapter.
If we're deferring to super.getItem(), then we should be guarding with super.getItemCount().
This commit is contained in:
parent
d0c14895d0
commit
fadd4ac61e
1 changed files with 1 additions and 1 deletions
|
@ -377,7 +377,7 @@ public class ConversationAdapter
|
||||||
pagingController.onDataNeededAroundIndex(position);
|
pagingController.onDataNeededAroundIndex(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (position < getItemCount()) {
|
if (position < super.getItemCount()) {
|
||||||
return super.getItem(position);
|
return super.getItem(position);
|
||||||
} else {
|
} else {
|
||||||
Log.d(TAG, "Could not access corrected position " + position + " as it is out of bounds.");
|
Log.d(TAG, "Could not access corrected position " + position + " as it is out of bounds.");
|
||||||
|
|
Loading…
Add table
Reference in a new issue