Merge pull request #1551 from mfietz/issue/1550-npe-list-item-click
ItemListFragment: Prevent onListItemClick() NPE
This commit is contained in:
commit
b5365e2d34
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue