avoid arrayoutofbounds when deleting the last photo
This commit is contained in:
parent
d36b8142f3
commit
e97f9b1db8
1 changed files with 2 additions and 0 deletions
|
@ -337,6 +337,8 @@ public class ViewPagerActivity extends AppCompatActivity
|
|||
}
|
||||
|
||||
private Medium getCurrentMedium() {
|
||||
if (pos >= media.size())
|
||||
pos = media.size() - 1;
|
||||
return media.get(pos);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue