Fixed NPE when selected item is null
The method is called again with a valid listAdapter automatically Closes #3154
This commit is contained in:
parent
7a921e0024
commit
7f514384fc
|
@ -279,11 +279,11 @@ public class AllEpisodesFragment extends Fragment {
|
||||||
return true; // avoids that the position is reset when we need it in the submenu
|
return true; // avoids that the position is reset when we need it in the submenu
|
||||||
}
|
}
|
||||||
|
|
||||||
FeedItem selectedItem = listAdapter.getSelectedItem();
|
if (listAdapter == null || listAdapter.getSelectedItem() == null) {
|
||||||
if (selectedItem == null) {
|
Log.i(TAG, "Selected item or listAdapter was null, ignoring selection");
|
||||||
Log.i(TAG, "Selected item was null, ignoring selection");
|
|
||||||
return super.onContextItemSelected(item);
|
return super.onContextItemSelected(item);
|
||||||
}
|
}
|
||||||
|
FeedItem selectedItem = listAdapter.getSelectedItem();
|
||||||
|
|
||||||
// Mark as seen contains UI logic specific to All/New/FavoriteSegments,
|
// Mark as seen contains UI logic specific to All/New/FavoriteSegments,
|
||||||
// e.g., Undo with Snackbar,
|
// e.g., Undo with Snackbar,
|
||||||
|
|
Loading…
Reference in New Issue