Commit af64a97f authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Ensure non nullity

CID #1297144
parent 1bec8f60
......@@ -346,7 +346,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
inflater.inflate(R.menu.directory_view_file, menu);
menu.findItem(R.id.directory_view_delete).setVisible(canWrite);
} else if (mw.getType() == MediaWrapper.TYPE_DIR) {
boolean isEmpty = mMediaLists.get(position).isEmpty();
boolean isEmpty = mMediaLists.get(position) == null || mMediaLists.get(position).isEmpty();
if (canWrite || !isEmpty) {
inflater.inflate(R.menu.directory_view_dir, menu);
if (canWrite) {
......
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