Skip to content
Snippets Groups Projects
Commit 2c9289c0 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Do not add item at invalid position

parent 266d21d2
No related branches found
No related tags found
No related merge requests found
......@@ -244,8 +244,10 @@ public class BaseBrowserAdapter extends BaseQueuedAdapter<ArrayList<MediaLibrary
if (item .getItemType() == TYPE_MEDIA && (((MediaWrapper) item).getType() == MediaWrapper.TYPE_VIDEO || ((MediaWrapper) item).getType() == MediaWrapper.TYPE_AUDIO))
mMediaCount++;
list.add(position, item);
update(list);
if (position <= list.size()) {
list.add(position, item);
update(list);
}
}
public void setTop (int top) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment