diff --git a/src/cheogram/java/eu/siacs/conversations/services/QuickConversationsService.java b/src/cheogram/java/eu/siacs/conversations/services/QuickConversationsService.java index 9c757552f4d33da5a9b87316a4e15a97bfee7026..ec2d214aebd12d07d8653bc57d8571b080163db0 100644 --- a/src/cheogram/java/eu/siacs/conversations/services/QuickConversationsService.java +++ b/src/cheogram/java/eu/siacs/conversations/services/QuickConversationsService.java @@ -10,6 +10,7 @@ import java.util.List; import java.util.Map; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableList; import android.content.Intent; import android.os.SystemClock; @@ -98,7 +99,7 @@ public class QuickConversationsService extends AbstractQuickConversationsService protected void considerSync(boolean forced) { ImmutableMap allContacts = null; - for (final Account account : service.getAccounts()) { + for (final Account account : ImmutableList.copyOf(service.getAccounts())) { List gateways = gateways(account); if (gateways.size() < 1) continue; if (allContacts == null) allContacts = PhoneNumberContact.load(service);