Skip to content

Commit

Permalink
Merge pull request jfeinstein10#16 from zaki50/fix-NPE
Browse files Browse the repository at this point in the history
added null check.
  • Loading branch information
jfeinstein10 committed Apr 10, 2013
2 parents 71f4c03 + e1fe62e commit 5170c98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/com/jfeinstein/jazzyviewpager/JazzyViewPager.java
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,9 @@ public void setObjectForPosition(Object obj, int position) {

private View findViewFromObject(int position) {
Object o = mObjs.get(Integer.valueOf(position));
if (o == null) {
return null;
}
PagerAdapter a = getAdapter();
View v;
for (int i = 0; i < getChildCount(); i++) {
Expand Down

0 comments on commit 5170c98

Please sign in to comment.