Fix a bug with index out of bounds

This commit is contained in:
Mario Danic 2018-11-08 03:14:44 +01:00
parent e5ba9cde8f
commit 20e1515b74

View file

@ -514,7 +514,9 @@ public class OperationsMenuController extends BaseController {
RetrofitBucket retrofitBucket;
final ArrayList<String> localInvitedUsers = invitedUsers;
final ArrayList<String> localInvitedGroups = invitedGroups;
localInvitedGroups.remove(0);
if (localInvitedGroups.size() > 0) {
localInvitedGroups.remove(0);
}
if (localInvitedUsers.size() > 0 || (localInvitedGroups.size() > 0 && currentUser.hasSpreedCapabilityWithName("invite-groups-and-mails"))) {
if ((localInvitedGroups.size() > 0 && currentUser.hasSpreedCapabilityWithName("invite-groups-and-mails"))) {
for (int i = 0; i < localInvitedGroups.size(); i++) {