Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
The crash was caused because of the options secondDateAfterFirst which was added in the commit db112c9
The issue was only reproduced when the flag secondDateAfterFirst was set to true and the WheelDayOfMonthPicker view was visible.
The listener addOnDateChangedListener was updating the second picker with the minimum date whereas when the WheelDayOfMonthPicker's visibility was gone, the picker had no items resulting in a crash in getItem() method of the WheelPicker adapter.
  • Loading branch information
Akhunzaada committed Jul 11, 2018
1 parent a1e1d3e commit 54386c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ public int getItemCount() {
@Override
public V getItem(int position) {
final int itemCount = getItemCount();
return data.get((position + itemCount) % itemCount);
return itemCount != 0 ? data.get((position + itemCount) % itemCount) : null;
}

@Override
Expand Down

0 comments on commit 54386c6

Please sign in to comment.