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 {
mAdapter = new MediaInfoAdapter(getActivity());
setListAdapter(mAdapter);
update();
return v;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
update();
}
public void setMediaLocation(String MRL) {
if (MRL == null)
return;
......
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