Skip to content

Commit a71cb5e

Browse files
committed
1 parent a7d0d06 commit a71cb5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/chad/library/adapter/base/BaseQuickAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ public List<T> getData() {
607607
*/
608608
@Nullable
609609
public T getItem(@IntRange(from = 0) int position) {
610-
if (position < mData.size())
610+
if (position >= 0 && position < mData.size())
611611
return mData.get(position);
612612
else
613613
return null;

0 commit comments

Comments
 (0)