Don't crash trying to show item at negative position (#6407)
I have no idea what code path could pass a negative number there, but apparently there are users who experience a crash when trying to show a negative position.
This commit is contained in:
parent
78f65349d5
commit
b706ab9776
|
@ -48,7 +48,7 @@ public class ItemPagerFragment extends Fragment implements MaterialToolbar.OnMen
|
|||
ItemPagerFragment fragment = new ItemPagerFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putLongArray(ARG_FEEDITEMS, feeditems);
|
||||
args.putInt(ARG_FEEDITEM_POS, feedItemPos);
|
||||
args.putInt(ARG_FEEDITEM_POS, Math.max(0, feedItemPos));
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue