aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-10-24 20:44:44 +0200
committerChristian Schneppe <christian@pix-art.de>2018-10-24 20:44:44 +0200
commitddab7292e5496e86ae033a3a36c86bf0b782b8f6 (patch)
tree762c687dc9a8daadc879d54056afd0e3d3d9490e /src/main/java
parent0088836fe3cf61aed28ad214940923e1d92c0d87 (diff)
try to catch a NPE on iterator.remove
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index f47893e48..3588f836b 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -2629,9 +2629,13 @@ public class XmppConnectionService extends Service {
for (ListIterator<Jid> iterator = cryptoTargets.listIterator(); iterator.hasNext(); ) {
Jid jid = iterator.next();
if (!members.contains(jid) && !members.contains(Jid.ofDomain(jid.getDomain()))) {
- iterator.remove();
- Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": removed " + jid + " from crypto targets of " + conversation.getName());
- changed = true;
+ try {
+ iterator.remove();
+ Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": removed " + jid + " from crypto targets of " + conversation.getName());
+ changed = true;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
}
if (changed) {