Skip to content

Commit

Permalink
* prevent a nullpointerexception
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Nov 11, 2017
1 parent d0c5692 commit 885133d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,8 @@ public boolean onClick(View v, IAdapter<IDrawerItem> adapter, final IDrawerItem
if (mAccountHeader != null && mAccountHeader.isSelectionListShown()) {
mAccountHeader.toggleSelectionList(v.getContext());
}
if (!mDrawer.getDrawerItem(item.getIdentifier()).isSelected()) {
IDrawerItem drawerItem = mDrawer.getDrawerItem(item.getIdentifier());
if (drawerItem != null && !drawerItem.isSelected()) {
//set the selection
mDrawer.setSelection(item, true);
}
Expand Down

0 comments on commit 885133d

Please sign in to comment.