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

Fix NPE on TV

parent a1342aa8
No related merge requests found
......@@ -76,7 +76,7 @@ public class StorageBrowserFragment extends FileBrowserFragment {
@Override
public void onStart() {
super.onStart();
if (mRoot) {
if (mRoot && mFabPlay != null) {
mFabPlay.setImageResource(R.drawable.ic_fab_add);
mFabPlay.setOnClickListener(this);
}
......@@ -85,15 +85,17 @@ public class StorageBrowserFragment extends FileBrowserFragment {
@Override
public void onStop() {
super.onStop();
mFabPlay.setVisibility(View.GONE);
mFabPlay.setOnClickListener(null);
if (mFabPlay != null) {
mFabPlay.setVisibility(View.GONE);
mFabPlay.setOnClickListener(null);
}
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if (VLCApplication.showTvUi()) {
if (mRoot)
if (mRoot && mFabPlay != null)
mFabPlay.requestFocus();
else
mRecyclerView.requestFocus();
......
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