avoid arrayoutofbounds when deleting the last photo

This commit is contained in:
tibbi 2016-06-14 10:12:03 +02:00
parent d36b8142f3
commit e97f9b1db8
1 changed files with 2 additions and 0 deletions

View File

@ -337,6 +337,8 @@ public class ViewPagerActivity extends AppCompatActivity
} }
private Medium getCurrentMedium() { private Medium getCurrentMedium() {
if (pos >= media.size())
pos = media.size() - 1;
return media.get(pos); return media.get(pos);
} }