Commit 1f245e48 authored by Geoffrey Métais's avatar Geoffrey Métais

MediaList: increase count after items move

Prevent ArrayIndexOutOfBoundsException
parent 4f3173b0
......@@ -106,10 +106,9 @@ public class MediaList extends VLCObject<MediaList.Event> {
private synchronized Media insertMediaFromEvent(int index) {
for (int i = mCount - 1; i >= index; --i)
mMediaArray.put(i + 1, mMediaArray.valueAt(i));
final Media media = new Media(this, index);
mMediaArray.put(index, media);
return media;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment