Commit 8493e217 authored by Geoffrey Métais's avatar Geoffrey Métais

Check getActivity is not null

parent ffc3d1dc
......@@ -139,11 +139,12 @@ public class HistoryFragment extends MediaBrowserFragment implements IRefreshabl
public void handleMessage(Message msg) {
switch (msg.what){
case UPDATE_LIST:
if (getActivity() == null)
return;
mHistoryAdapter.setList((ArrayList<MediaWrapper>) msg.obj);
updateEmptyView();
if( mHistoryAdapter != null ) {
if (mHistoryAdapter != null)
mHistoryAdapter.notifyDataSetChanged();
}
mSwipeRefreshLayout.setRefreshing(false);
getActivity().supportInvalidateOptionsMenu();
}
......
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