Prevent NPE

This commit is contained in:
Martin Fietz 2016-01-13 19:21:37 +01:00
parent 95bb95fc89
commit 1f00747e98
1 changed files with 3 additions and 0 deletions

View File

@ -370,6 +370,9 @@ public class ItemlistFragment extends ListFragment {
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
if(adapter == null) {
return;
}
FeedItem selection = adapter.getItem(position - l.getHeaderViewsCount());
if (selection != null) {
MainActivity activity = (MainActivity) getActivity();