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

Fix off-by-1 ArrayOutOfBoundsException

parent b9d243be
No related branches found
No related tags found
No related merge requests found
......@@ -292,8 +292,8 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements DevicesDis
if (id == R.id.audio_list_browser_delete) {
final MediaLibraryItem mediaLibraryItem = adapter.getItem(position);
final MediaLibraryItem previous = position> 0 ? adapter.getItem(position-1) : null;
final MediaLibraryItem next = position < adapter.getItemCount() ? adapter.getItem(position+1) : null;
final MediaLibraryItem previous = position > 0 ? adapter.getItem(position-1) : null;
final MediaLibraryItem next = position < adapter.getItemCount()-1 ? adapter.getItem(position+1) : null;
String message;
Runnable action;
final MediaLibraryItem separator = previous != null && previous.getItemType() == MediaLibraryItem.TYPE_DUMMY &&
......
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