Fixed possible array out of bounds in the BoardEditor swipe away.

The lib seems to have a bug or something, do bounds checking.
captchafix
Florens Douwes 11 years ago
parent aee0398f16
commit 07004addf6
  1. 8
      Clover/src/org/floens/chan/ui/activity/BoardEditor.java

@ -97,9 +97,11 @@ public class BoardEditor extends Activity {
@Override
public void onDismiss(ListView listView, int[] reverseSortedPositions) {
for (int position : reverseSortedPositions) {
Board b = adapter.getItem(position);
adapter.remove(b);
b.saved = false;
if (position >= 0 && position < adapter.getCount()) {
Board b = adapter.getItem(position);
adapter.remove(b);
b.saved = false;
}
}
adapter.notifyDataSetChanged();

Loading…
Cancel
Save