Commit bae8a754 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Avoid possible null pointer exception

parent a3bba6d4
......@@ -81,7 +81,7 @@ public class MediaLibrary {
ArrayList<Media> videoItems = new ArrayList<Media>();
for (int i = 0; i < mItemList.size(); i++) {
Media item = mItemList.get(i);
if (item.getType() == Media.TYPE_VIDEO) {
if (item != null && item.getType() == Media.TYPE_VIDEO) {
videoItems.add(item);
}
}
......
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