mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-05 13:27:09 +01:00
Merge pull request #1294 from mfietz/issue/1293-NPE-MainActivity-onContextItemSelected
Prevent NPE in MainActivity.onContextItemSelected()
This commit is contained in:
commit
277cfa01d0
@ -551,8 +551,11 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
|
||||
menuInfo = lastMenuInfo;
|
||||
}
|
||||
|
||||
if(menuInfo.targetView.getParent() instanceof ListView == false
|
||||
|| ((ListView)menuInfo.targetView.getParent()).getId() != R.id.nav_list) {
|
||||
if(menuInfo == null
|
||||
|| menuInfo.targetView == null
|
||||
|| menuInfo.targetView.getParent() == null
|
||||
|| menuInfo.targetView.getParent() instanceof ListView == false
|
||||
|| ((ListView)menuInfo.targetView.getParent()).getId() != R.id.nav_list) {
|
||||
return false;
|
||||
}
|
||||
final int position = menuInfo.position;
|
||||
|
Loading…
Reference in New Issue
Block a user