Fixes a crash due to class cast

This commit is contained in:
tom79 2017-09-13 19:15:02 +02:00
parent c3893e85d6
commit 2a41e035f7
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
} }
statusListAdapter.notifyDataSetChanged(); statusListAdapter.notifyDataSetChanged();
} }
if( firstLoad) if( firstLoad && getActivity() != null && getActivity().getClass().isInstance(MainActivity.class))
((MainActivity)context).updateHomeCounter(); ((MainActivity)context).updateHomeCounter();
swipeRefreshLayout.setRefreshing(false); swipeRefreshLayout.setRefreshing(false);
firstLoad = false; firstLoad = false;