[Hotfix] Fix crashing in grades subject adapter.

This commit is contained in:
Kacper Ziubryniewicz 2019-12-29 20:22:48 +01:00
parent 4a38906194
commit 5e2c7e89ab

View File

@ -697,6 +697,9 @@ public class GradesSubjectAdapter extends ArrayAdapter<ItemGradesSubjectModel> i
@NonNull @NonNull
@Override @Override
public View getView(int position, View convertView, @NonNull ViewGroup parent) { public View getView(int position, View convertView, @NonNull ViewGroup parent) {
if (position >= subjectList.size()) {
return convertView;
}
ItemGradesSubjectModel model = subjectList.get(position); ItemGradesSubjectModel model = subjectList.get(position);
if (model == null) { if (model == null) {
//Toast.makeText(activity, "return convertView;", Toast.LENGTH_SHORT).show(); //Toast.makeText(activity, "return convertView;", Toast.LENGTH_SHORT).show();