From b135486bb48d7818c23bdabb922aa5b6093ed5ac Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 2 Dec 2019 13:21:18 +0100 Subject: [PATCH] prevent crash when deleting account on servers that don't support omemo --- .../eu/siacs/conversations/crypto/axolotl/AxolotlService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java index 59ff20fe5..44336d4fc 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java @@ -843,7 +843,8 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded { final String node = AxolotlService.PEP_BUNDLES + ":" + getOwnDeviceId(); final IqPacket deleteBundleNode = mXmppConnectionService.getIqGenerator().deleteNode(node); mXmppConnectionService.sendIqPacket(account, deleteBundleNode, null); - publishDeviceIdsAndRefineAccessModel(getOwnDeviceIds()); + final Set ownDeviceIds = getOwnDeviceIds(); + publishDeviceIdsAndRefineAccessModel(ownDeviceIds == null ? Collections.emptySet() : ownDeviceIds); } public List getCryptoTargets(Conversation conversation) {