mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 12:38:00 +01:00
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