We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e29caa4 commit 2fd3494Copy full SHA for 2fd3494
convenientbanner/src/main/java/com/bigkoo/convenientbanner/CBLoopViewPager.java
@@ -125,7 +125,10 @@ public int getCurrentItem() {
125
}
126
127
public void setCurrentItem(int item, boolean smoothScroll) {
128
- int realItem = mAdapter.toInnerPosition(item);
+ int realItem = 0;
129
+ try {
130
+ realItem = mAdapter.toInnerPosition(item);
131
+ }catch (NullPointerException e){}
132
super.setCurrentItem(realItem, smoothScroll);
133
134
0 commit comments