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

MediaInfoFragment: avoid a crash accessing the Activity

YOU SHALL NOT call getActivity before onActivityCreated() in a fragment

And of course, update() was called in onCreateView
parent 22f612fd
...@@ -79,11 +79,15 @@ public class MediaInfoFragment extends ListFragment { ...@@ -79,11 +79,15 @@ public class MediaInfoFragment extends ListFragment {
mAdapter = new MediaInfoAdapter(getActivity()); mAdapter = new MediaInfoAdapter(getActivity());
setListAdapter(mAdapter); setListAdapter(mAdapter);
return v; return v;
} }
public void onActivityCreated(Bundle savedInstanceState) {
public void setMediaLocation(String MRL) { public void setMediaLocation(String MRL) {
if (MRL == null) if (MRL == null)
return; return;
Supports Markdown
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