Just check everything for null before you do stuff with it
This commit is contained in:
parent
c9986edc5e
commit
9dcf3de723
|
@ -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