Commit 7d40ed44 authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent NPE in browser menu

parent 412253ae
...@@ -155,7 +155,8 @@ public abstract class BaseBrowserFragment extends SortableFragment<BaseBrowserAd ...@@ -155,7 +155,8 @@ public abstract class BaseBrowserFragment extends SortableFragment<BaseBrowserAd
@Override @Override
public void onPrepareOptionsMenu(Menu menu) { public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu); super.onPrepareOptionsMenu(menu);
menu.findItem(R.id.ml_menu_filter).setVisible(enableSearchOption()); final MenuItem item = menu.findItem(R.id.ml_menu_filter);
if (item != null) item.setVisible(enableSearchOption());
} }
protected int getLayoutId(){ protected int getLayoutId(){
......
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