Commit b5db0245 authored by Geoffrey Métais's avatar Geoffrey Métais

Make comparison null sensitive

parent 13c3c9fc
......@@ -347,6 +347,11 @@ public class VideoListAdapter extends RecyclerView.Adapter<VideoListAdapter.View
@Override
public int compare(MediaWrapper item1, MediaWrapper item2) {
if (item1 == null)
return item2 == null ? 0 : -1;
else if (item2 == null)
return 1;
int compare = 0;
switch (mSortBy) {
case SORT_BY_TITLE:
......
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