avoid ArrayIndexOutOfBounds for dependent start time setting when a regatta has only one race

This commit is contained in:
Axel Uhl committed 2015-07-18 10:09:57 +02:00
1 parent 1e46ea4fae
commit 15635dd8f8
1 file changed
+1 -1
@@ -118,7 +118,7 @@ public class DependentRaceSpinnerAdapter implements SpinnerAdapter {
}
TextView text = ViewHolder.get(layout, android.R.id.text1);
if (text != null && mData.get(position).getRace() != null) {
if (text != null && position < mData.size() && mData.get(position).getRace() != null) {
String raceName = mData.get(position).getRace().getName();
String additional = RaceHelper.getFleetSeries(mData.get(position).getRace());
if (!TextUtils.isEmpty(additional)) {