Prevent crash

This commit is contained in:
M66B 2022-04-27 09:53:25 +02:00
parent e0d5331c29
commit 3664d9b656
1 changed files with 3 additions and 2 deletions

View File

@ -134,7 +134,8 @@ public class AdapterNavMenu extends RecyclerView.Adapter<AdapterNavMenu.ViewHold
return;
NavMenuItem menu = items.get(pos);
menu.onClick();
if (menu != null)
menu.onClick();
}
@Override
@ -144,7 +145,7 @@ public class AdapterNavMenu extends RecyclerView.Adapter<AdapterNavMenu.ViewHold
return false;
NavMenuItem menu = items.get(pos);
return menu.onLongClick();
return (menu != null && menu.onLongClick());
}
}