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

View file

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